Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Sending email from bash

I need to send emails automatically and regularly triggered by an event.

For the sake of simplicity and robustness i chose mail / mailx.



Sympthom:

. I can send email to myself using my own MBP name mine@my-mac.local

. I cannot send any email to outer addressees

in /var/mail/mine I got errors either "Connection refused" or "No route to host"

that is in case of gmail.com domain.



. Than I tried to configure mailx to use remote mail server smtp.gmail.com:587

(this one is used by my mail in Lion )

Here is the ~/.mailrc congfig



alias MYGROUP xxxx yyyy zzzz

set smtp-use-starttls

set ssl-verify=ignore

set smtp=smtps://smtp.gmail.com:587

set smtp-auth=login

set smtp-auth-user=mymail@gmail.com

set smtp-auth-password=mypass



I started mailx -n -v so the mailrc was used since the delivery report showed all three mails but

resulting in the same errors above and using the port 25 as if all set commands were ignored.



Question: Is there a way to have it worked with this kind of configuration, if so what did I wrong.

(They say it works in Linux / Solaris environment)

MacBook Pro, Mac OS X (10.7.5)

Posted on Dec 2, 2012 8:57 AM

Reply

There are no replies.

Sending email from bash

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.