Unable to send email from mailsend

Closing Notes:

You do not need ca-bundle and ca-certificates packages to be installed, it works even without these installed.

Example Command:

mailsend -f "xyz@gmail.com" -t "xyz@xyz.com" -smtp "smtp.gmail.com" -starttls -auth-login -user "xyz@gmail.com" -pass "abcdefghijklmnop" -sub "Test from OpenWrt" -M "Test from OpenWrt"

I've had better success in sending out email's with Google's SMTP than Outlook, for some reason, sometimes, Outlook' SMTP fails with the following error message:

root@OpenWrt_Netgear_R6220:~# mailsend -f "xyz@hotmail.com" -t "xyz@xyz.com" -smtp "smtp-mail.outlook.com" -starttls -auth-login -user "xyz@hotmail.com" -pass "abcdefghijklmnop" -sub "Test from OpenWrt" -M "Test from OpenWrt"
Socket Error: [11]: Resource temporarily unavailable
Error: Connection is closed unexpectedly
Error: AUTH LOGIN failed: '-1 '
Could not send mail

Outlook works after 3-4 retries of the same command, don't know what's the matter there, never had socket issues on my Windows Laptop sending email out through PowerShell through Outlook.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.