Advertisement
Guest User

Untitled

a guest
Mar 31st, 2012
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. it echos "sent" but i dont get the email nor in the spam folder of my email
  2.  
  3. user1@pc1:/$ cat /var/log/syslog|grep sendmail
  4. Mar 31 23:04:18 pc1 sendmail[6515]: My unqualified host name (pc1) unknown; sleeping for retry
  5. Mar 31 23:05:01 pc1 cron[1082]: (*system*sendmail) RELOAD (/etc/cron.d/sendmail)
  6. Mar 31 23:05:18 pc1 sendmail[6515]: unable to qualify my own domain name (pc1) -- using short name
  7. Mar 31 23:05:18 pc1 sendmail[6515]: alias database /etc/mail/aliases rebuilt by root
  8. Mar 31 23:05:18 pc1 sendmail[6515]: /etc/mail/aliases: 4 aliases, longest 10 bytes, 66 bytes total
  9. Mar 31 23:12:23 pc1 sendmail[6657]: My unqualified host name (pc1) unknown; sleeping for retry
  10. Mar 31 23:13:23 pc1 sendmail[6657]: unable to qualify my own domain name (pc1) -- using short name
  11. 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
  12. 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)
  13. Mar 31 23:17:17 pc1 sendmail[6704]: My unqualified host name (pc1) unknown; sleeping for retry
  14. Mar 31 23:18:17 pc1 sendmail[6704]: unable to qualify my own domain name (pc1) -- using short name
  15. 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
  16. 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)
  17. Mar 31 23:20:01 pc1 CRON[6738]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
  18. Mar 31 23:27:36 pc1 sendmail[6948]: My unqualified host name (pc1) unknown; sleeping for retry
  19. Mar 31 23:28:36 pc1 sendmail[6948]: unable to qualify my own domain name (pc1) -- using short name
  20. Mar 31 23:28:36 pc1 sendmail[6948]: q2VISadV006948: from=user1, size=301, class=0, nrcpts=1, msgid=<201203311828.q2VISadV006948@pc1>, relay=user1@localhost
  21. 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)
  22. Mar 31 23:32:54 pc1 sendmail[6987]: My unqualified host name (pc1) unknown; sleeping for retry
  23. Mar 31 23:33:54 pc1 sendmail[6987]: unable to qualify my own domain name (pc1) -- using short name
  24. 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
  25. 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)
  26. Mar 31 23:36:12 pc1 sendmail[7220]: My unqualified host name (pc1) unknown; sleeping for retry
  27. Mar 31 23:37:12 pc1 sendmail[7220]: unable to qualify my own domain name (pc1) -- using short name
  28. 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
  29. 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)
  30. Mar 31 23:40:01 pc1 CRON[7301]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
  31. Apr 1 00:00:01 pc1 CRON[7511]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
  32. Apr 1 00:03:24 pc1 sendmail[7542]: My unqualified host name (pc1) unknown; sleeping for retry
  33. Apr 1 00:04:24 pc1 sendmail[7542]: unable to qualify my own domain name (pc1) -- using short name
  34. 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
  35. 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)
  36. Apr 1 00:20:01 pc1 CRON[7618]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
  37. Apr 1 00:40:01 pc1 CRON[8016]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
  38. Apr 1 01:00:01 pc1 CRON[8149]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
  39. Apr 1 01:20:01 pc1 CRON[9300]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
  40. Apr 1 01:40:01 pc1 CRON[9423]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
  41. Apr 1 01:49:24 pc1 sendmail[10078]: My unqualified host name (pc1) unknown; sleeping for retry
  42. Apr 1 01:50:24 pc1 sendmail[10078]: unable to qualify my own domain name (pc1) -- using short name
  43. Apr 1 01:50:24 pc1 sendmail[10078]: q2VKoO7A010078: from=user1, size=83, class=0, nrcpts=1, msgid=<201203312050.q2VKoO7A010078@pc1>, relay=user1@localhost
  44. 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
  45. Apr 1 01:51:32 pc1 sendmail[10105]: My unqualified host name (pc1) unknown; sleeping for retry
  46. Apr 1 01:52:32 pc1 sendmail[10105]: unable to qualify my own domain name (pc1) -- using short name
  47. Apr 1 01:52:32 pc1 sendmail[10105]: q2VKqWxv010105: from=user1, size=75, class=0, nrcpts=1, msgid=<201203312052.q2VKqWxv010105@pc1>, relay=user1@localhost
  48. 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)
  49. Apr 1 02:00:01 pc1 CRON[10175]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
  50. Apr 1 02:06:42 pc1 sendmail[10258]: My unqualified host name (pc1) unknown; sleeping for retry
  51. Apr 1 02:06:59 pc1 sendmail[10265]: My unqualified host name (pc1) unknown; sleeping for retry
  52. Apr 1 02:07:42 pc1 sendmail[10258]: unable to qualify my own domain name (pc1) -- using short name
  53. 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
  54. 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)
  55. Apr 1 02:07:59 pc1 sendmail[10265]: unable to qualify my own domain name (pc1) -- using short name
  56. 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
  57. 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)
  58. Apr 1 02:11:53 pc1 sendmail[10320]: My unqualified host name (pc1) unknown; sleeping for retry
  59.  
  60. <?php
  61.  
  62. $to = "ab159ab@hotmail.com";
  63.  
  64. // Windows may not handle this format well
  65. // $to = "Recipient Name <nobody@somedomain.com>";
  66.  
  67. // multiple recipients
  68. // $to = "nobody@somedomain.com, somebody@somedomain.com";
  69. // $to = "Recipient Name <nobody@somedomain.com>, somebody@somedomain.com";
  70.  
  71. $subject = "Mail Test at ".strftime("%T", time());
  72.  
  73. $message = "This is a test.";
  74. // Optional: Wrap lines for old email programs
  75. // wrap at 70/72/75/78
  76. $message = wordwrap($message,70);
  77.  
  78. $from = "Sender Name <somebody@somedomain.com>";
  79. $headers = "From: {$from}\n";
  80. $headers .= "Reply-To: {$from}\n";
  81. // $headers .= "Cc: {$to}\n";
  82. // $headers .= "Bcc: {$to}\n";
  83. $headers .= "X-Mailer: PHP/".phpversion()."\n";
  84. $headers .= "MIME-Version: 1.0\n";
  85. $headers .= "Content-Type: text/plain; charset=iso-8859-1";
  86.  
  87. $result = mail($to, $subject, $message, $headers);
  88. echo $result ? 'Sent' : 'Error';
  89.  
  90. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement