I have AWS ubuntu instance. I am trying to send simple mail through PHP mail function. Mail function returns true but mail is not delivered neither to gmail nor to my host. I also tried sending email through command but that also doesnt work. I am attaching sendmail service status here. Kindly help me to fix this problem.
- sendmail status for gmail:
Nov 12 14:41:23 ip-172-31-51-198 sm-mta[21446]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1.2, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
Nov 12 14:41:23 ip-172-31-51-198 sm-mta[21446]: wACJfNOM021444: to=<mymail@gmail.com>, ctladdr=<www-data@ip-172-31-51-198.ec2.internal> (33/33), delay=00:00:00, xdelay=00:00:00, mailer=esmtp,
Nov 12 14:41:23 ip-172-31-51-198 sm-mta[21446]: wACJfNOM021444: wACJfNOM021446: DSN: Service unavailable
Nov 12 14:41:23 ip-172-31-51-198 sm-mta[21446]: wACJfNOM021446: to=<www-data@ip-172-31-51-198.ec2.internal>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
-
send mail status for mydomain.com
Nov 12 14:40:02 ip-172-31-51-198 systemd[1]: Stopped LSB: powerful, efficient, and scalable Mail Transport Agent. Nov 12 14:40:02 ip-172-31-51-198 systemd[1]: Starting LSB: powerful, efficient, and scalable Mail Transport Agent... Nov 12 14:40:02 ip-172-31-51-198 sendmail[21348]: * Starting Mail Transport Agent (MTA) sendmail Nov 12 14:40:02 ip-172-31-51-198 sm-mta[21388]: starting daemon (8.15.2): SMTP+queueing@00:10:00 Nov 12 14:40:04 ip-172-31-51-198 sendmail[21348]: ...done. Nov 12 14:40:04 ip-172-31-51-198 systemd[1]: Started LSB: powerful, efficient, and scalable Mail Transport Agent. Nov 12 14:40:17 ip-172-31-51-198 sm-mta[21408]: wACJeHlI021408: <myemail@mydomain.com>... User unknown Nov 12 14:40:17 ip-172-31-51-198 sm-mta[21408]: wACJeHlI021408: from=<www-data@ip-172-31-51-198.ec2.internal>, size=596, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1] Nov 12 14:40:17 ip-172-31-51-198 sm-mta[21408]: wACJeHlK021408: from=<>, size=2592, class=0, nrcpts=1, msgid=<201811121940.wACJeHpa021407@ip-172-31-51-198.ec2.internal>, proto=ESMTP, daemon=MTA, r Nov 12 14:40:17 ip-172-31-51-198 sm-mta[21409]: wACJeHlK021408: to=<www-data@ip-172-31-51-198.ec2.internal>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32835, dsn=2.0.0, stat=Sent