Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it echos "sent" but i dont get the email nor in the spam folder of my email
- user1@pc1:/$ cat /var/log/syslog|grep sendmail
- Mar 31 23:04:18 pc1 sendmail[6515]: My unqualified host name (pc1) unknown; sleeping for retry
- Mar 31 23:05:01 pc1 cron[1082]: (*system*sendmail) RELOAD (/etc/cron.d/sendmail)
- Mar 31 23:05:18 pc1 sendmail[6515]: unable to qualify my own domain name (pc1) -- using short name
- Mar 31 23:05:18 pc1 sendmail[6515]: alias database /etc/mail/aliases rebuilt by root
- Mar 31 23:05:18 pc1 sendmail[6515]: /etc/mail/aliases: 4 aliases, longest 10 bytes, 66 bytes total
- Mar 31 23:12:23 pc1 sendmail[6657]: My unqualified host name (pc1) unknown; sleeping for retry
- Mar 31 23:13:23 pc1 sendmail[6657]: unable to qualify my own domain name (pc1) -- using short name
- Mar 31 23:13:23 pc1 sendmail[6657]: q2VIDNK2006657: from=www-data, size=301, class=0, nrcpts=1, msgid=<201203311813.q2VIDNK2006657@pc1>, relay=www-data@localhost
- Mar 31 23:13:24 pc1 sendmail[6657]: q2VIDNK2006657: to=ab159ab@hotmail.com, ctladdr=www-data (33/33), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30301, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q2VIDN1f006663 Message accepted for delivery)
- Mar 31 23:17:17 pc1 sendmail[6704]: My unqualified host name (pc1) unknown; sleeping for retry
- Mar 31 23:18:17 pc1 sendmail[6704]: unable to qualify my own domain name (pc1) -- using short name
- Mar 31 23:18:17 pc1 sendmail[6704]: q2VIIHra006704: from=www-data, size=301, class=0, nrcpts=1, msgid=<201203311818.q2VIIHra006704@pc1>, relay=www-data@localhost
- Mar 31 23:18:17 pc1 sendmail[6704]: q2VIIHra006704: to=ab159ab@hotmail.com, ctladdr=www-data (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30301, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q2VIIHGw006718 Message accepted for delivery)
- Mar 31 23:20:01 pc1 CRON[6738]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
- Mar 31 23:27:36 pc1 sendmail[6948]: My unqualified host name (pc1) unknown; sleeping for retry
- Mar 31 23:28:36 pc1 sendmail[6948]: unable to qualify my own domain name (pc1) -- using short name
- Mar 31 23:28:36 pc1 sendmail[6948]: q2VISadV006948: from=user1, size=301, class=0, nrcpts=1, msgid=<201203311828.q2VISadV006948@pc1>, relay=user1@localhost
- Mar 31 23:28:37 pc1 sendmail[6948]: q2VISadV006948: to=ab159ab@hotmail.com, ctladdr=user1 (1000/1000), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30301, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q2VISawJ006951 Message accepted for delivery)
- Mar 31 23:32:54 pc1 sendmail[6987]: My unqualified host name (pc1) unknown; sleeping for retry
- Mar 31 23:33:54 pc1 sendmail[6987]: unable to qualify my own domain name (pc1) -- using short name
- Mar 31 23:33:54 pc1 sendmail[6987]: q2VIXsxU006987: from=www-data, size=301, class=0, nrcpts=1, msgid=<201203311833.q2VIXsxU006987@pc1>, relay=www-data@localhost
- Mar 31 23:33:54 pc1 sendmail[6987]: q2VIXsxU006987: to=ab159ab@hotmail.com, ctladdr=www-data (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30301, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q2VIXsuM007029 Message accepted for delivery)
- Mar 31 23:36:12 pc1 sendmail[7220]: My unqualified host name (pc1) unknown; sleeping for retry
- Mar 31 23:37:12 pc1 sendmail[7220]: unable to qualify my own domain name (pc1) -- using short name
- Mar 31 23:37:13 pc1 sendmail[7220]: q2VIbC45007220: from=www-data, size=301, class=0, nrcpts=1, msgid=<201203311837.q2VIbC45007220@pc1>, relay=www-data@localhost
- Mar 31 23:37:13 pc1 sendmail[7220]: q2VIbC45007220: to=ab159ab@hotmail.com, ctladdr=www-data (33/33), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30301, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q2VIbDar007279 Message accepted for delivery)
- Mar 31 23:40:01 pc1 CRON[7301]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
- Apr 1 00:00:01 pc1 CRON[7511]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
- Apr 1 00:03:24 pc1 sendmail[7542]: My unqualified host name (pc1) unknown; sleeping for retry
- Apr 1 00:04:24 pc1 sendmail[7542]: unable to qualify my own domain name (pc1) -- using short name
- Apr 1 00:04:25 pc1 sendmail[7542]: q2VJ4OQ3007542: from=www-data, size=301, class=0, nrcpts=1, msgid=<201203311904.q2VJ4OQ3007542@pc1>, relay=www-data@localhost
- Apr 1 00:04:25 pc1 sendmail[7542]: q2VJ4OQ3007542: to=ab159ab@hotmail.com, ctladdr=www-data (33/33), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30301, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q2VJ4PR1007543 Message accepted for delivery)
- Apr 1 00:20:01 pc1 CRON[7618]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
- Apr 1 00:40:01 pc1 CRON[8016]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
- Apr 1 01:00:01 pc1 CRON[8149]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
- Apr 1 01:20:01 pc1 CRON[9300]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
- Apr 1 01:40:01 pc1 CRON[9423]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
- Apr 1 01:49:24 pc1 sendmail[10078]: My unqualified host name (pc1) unknown; sleeping for retry
- Apr 1 01:50:24 pc1 sendmail[10078]: unable to qualify my own domain name (pc1) -- using short name
- Apr 1 01:50:24 pc1 sendmail[10078]: q2VKoO7A010078: from=user1, size=83, class=0, nrcpts=1, msgid=<201203312050.q2VKoO7A010078@pc1>, relay=user1@localhost
- Apr 1 01:50:24 pc1 sendmail[10078]: q2VKoO7A010078: to=<yourloginname@pc1>, ctladdr=user1 (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30083, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
- Apr 1 01:51:32 pc1 sendmail[10105]: My unqualified host name (pc1) unknown; sleeping for retry
- Apr 1 01:52:32 pc1 sendmail[10105]: unable to qualify my own domain name (pc1) -- using short name
- Apr 1 01:52:32 pc1 sendmail[10105]: q2VKqWxv010105: from=user1, size=75, class=0, nrcpts=1, msgid=<201203312052.q2VKqWxv010105@pc1>, relay=user1@localhost
- Apr 1 01:52:32 pc1 sendmail[10105]: q2VKqWxv010105: to=<user1@pc1>, ctladdr=user1 (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30075, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q2VKqWJ4010115 Message accepted for delivery)
- Apr 1 02:00:01 pc1 CRON[10175]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
- Apr 1 02:06:42 pc1 sendmail[10258]: My unqualified host name (pc1) unknown; sleeping for retry
- Apr 1 02:06:59 pc1 sendmail[10265]: My unqualified host name (pc1) unknown; sleeping for retry
- Apr 1 02:07:42 pc1 sendmail[10258]: unable to qualify my own domain name (pc1) -- using short name
- Apr 1 02:07:42 pc1 sendmail[10258]: q2VL7gQa010258: from=www-data, size=297, class=0, nrcpts=1, msgid=<201203312107.q2VL7gQa010258@pc1>, relay=www-data@localhost
- Apr 1 02:07:43 pc1 sendmail[10258]: q2VL7gQa010258: to=ab159ab@hotmail.com, ctladdr=www-data (33/33), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30297, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q2VL7gDa010272 Message accepted for delivery)
- Apr 1 02:07:59 pc1 sendmail[10265]: unable to qualify my own domain name (pc1) -- using short name
- Apr 1 02:07:59 pc1 sendmail[10265]: q2VL7xmR010265: from=www-data, size=297, class=0, nrcpts=1, msgid=<201203312107.q2VL7xmR010265@pc1>, relay=www-data@localhost
- Apr 1 02:07:59 pc1 sendmail[10265]: q2VL7xmR010265: to=ab159ab@hotmail.com, ctladdr=www-data (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30297, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q2VL7xPs010279 Message accepted for delivery)
- Apr 1 02:11:53 pc1 sendmail[10320]: My unqualified host name (pc1) unknown; sleeping for retry
- <?php
- $to = "ab159ab@hotmail.com";
- // Windows may not handle this format well
- // $to = "Recipient Name <nobody@somedomain.com>";
- // multiple recipients
- // $to = "nobody@somedomain.com, somebody@somedomain.com";
- // $to = "Recipient Name <nobody@somedomain.com>, somebody@somedomain.com";
- $subject = "Mail Test at ".strftime("%T", time());
- $message = "This is a test.";
- // Optional: Wrap lines for old email programs
- // wrap at 70/72/75/78
- $message = wordwrap($message,70);
- $from = "Sender Name <somebody@somedomain.com>";
- $headers = "From: {$from}\n";
- $headers .= "Reply-To: {$from}\n";
- // $headers .= "Cc: {$to}\n";
- // $headers .= "Bcc: {$to}\n";
- $headers .= "X-Mailer: PHP/".phpversion()."\n";
- $headers .= "MIME-Version: 1.0\n";
- $headers .= "Content-Type: text/plain; charset=iso-8859-1";
- $result = mail($to, $subject, $message, $headers);
- echo $result ? 'Sent' : 'Error';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement