Link to home
Start Free TrialLog in
Avatar of jagku
jagkuFlag for United States of America

asked on

sendmail not working

Hello Experts,

I am trying to execute the following command:

(echo "Subject: test" ; echo "test" ; ) | /usr/sbin/sendmail <my email address>

However, I do not receive any email.
I have tried to add the -v flag.
However, I don't receive any verbose.

The sendmail queue is empty.

How can I start to resolve this?

Thanks!
Avatar of arnold
arnold
Flag of United States of America image

This is not a properly formatted message

check /var/log/maillog to see what happened to what you tried to do.


echo "To: <recipient>
From: <sender>
Subject: test

test

"| /usr/sbin/sendmail <recipient>
If you are writing a script to send an email I wouild use the "mail" or "mailx" or "mutt" commands instead of "sendmail". For example:

( echo "test" ; ) | /usr/sbin/mail -s "Subject: test" <my email address>
Avatar of jagku

ASKER

arnold:

Thank you. I get the following in the log (have replaced my email address with name@example.com):

ep 28 13:51:14 my-dev sm-mta[28420]: p8S94mTV025475: to=<name@example.com>, ctladdr=<www-data@localhost6.localdomain6> (33/33), delay=03:46:26, xdelay=00:00:00, mailer=esmtp, pri=1740433, relay=mx183.emailfiltering.com., dsn=4.0.0, stat=Deferred: Connection timed out with mx183.emailfiltering.com.

What does this mean?

sjm_ee - thanks. I want to use php to send email. However, it doesn't appear to be working as I can't get sendmail to work.
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial