Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $toEmail = '...';
- $subject = '...';
- $message = '...';
- $headers = array();
- $headers[] = "MIME-Version: 1.0";
- $headers[] = "Content-type: text/plain; charset=utf-8";
- $headers[] = "From: [email protected]";
- $headers[] = "Subject: {$subject}";
- $headers[] = "X-Mailer: PHP/".phpversion();
- if(mail($toEmail, $subject, $message, implode("rn",$headers))) {
- return TRUE;
- }
- May 3 14:19:12 btfmx5 sendmail[544]: u43CJCtW000544: from=www-data, size=1174, class=0, nrcpts=1, msgid=<[email protected]>, relay=www-data@localhost
- May 3 14:19:13 btfmx5 sm-mta[545]: u43CJDBO000545: from=<[email protected]>, size=1419, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
- May 3 14:19:13 btfmx5 sendmail[544]: u43CJCtW000544: [email protected], ctladdr=www-data (33/33), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=31174, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (u43CJDBO000545 Message accepted for delivery)
- May 3 14:19:13 btfmx5 sm-mta[547]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
- May 3 14:19:13 btfmx5 sm-mta[547]: u43CJDBO000545: to=<[email protected]>, ctladdr=<[email protected]> (33/33), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=121419, relay=gmail-smtp-in.l.google.com. [64.233.184.26], dsn=2.0.0, stat=Sent (OK 1462278313 o16si26784998wme.6 - gsmtp)
- May 3 14:26:50 btfmx5 sendmail[571]: u43CQoiH000571: from=www-data, size=1174, class=0, nrcpts=1, msgid=<[email protected]>, relay=www-data@localhost
- May 3 14:26:50 btfmx5 sm-mta[572]: u43CQogB000572: from=<[email protected]>, size=1419, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
- May 3 14:26:50 btfmx5 sendmail[571]: u43CQoiH000571: [email protected], ctladdr=www-data (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31174, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (u43CQogB000572 Message accepted for delivery)
- May 3 14:26:51 btfmx5 sm-mta[574]: STARTTLS=client, relay=mta5.am0.yahoodns.net., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
- May 3 14:26:53 btfmx5 sm-mta[574]: u43CQogB000572: to=<[email protected]>, ctladdr=<[email protected]> (33/33), delay=00:00:03, xdelay=00:00:03, mailer=esmtp, pri=121419, relay=mta5.am0.yahoodns.net. [66.196.118.37], dsn=5.0.0, stat=Service unavailable
- May 3 14:26:53 btfmx5 sm-mta[574]: u43CQogB000572: u43CQrgB000574: DSN: Service unavailable
- May 3 14:26:53 btfmx5 sm-mta[574]: u43CQrgB000574: to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
- echo "Subject: testmail" | sendmail -v [email protected]
- May 3 14:34:35 btfmx5 sendmail[581]: u43CYZp5000581: from=alumpi, size=18, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
- May 3 14:34:35 btfmx5 sm-mta[582]: u43CYZx0000582: from=<[email protected]>, size=340, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
- May 3 14:34:37 btfmx5 sm-mta[582]: STARTTLS=client, relay=mta7.am0.yahoodns.net., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
- May 3 14:34:39 btfmx5 sm-mta[582]: u43CYZx0000582: to=<[email protected]>, ctladdr=<[email protected]> (1000/1000), delay=00:00:04, xdelay=00:00:04, mailer=esmtp, pri=30340, relay=mta7.am0.yahoodns.net. [63.250.192.45], dsn=2.0.0, stat=Sent (ok dirdel)
- May 3 14:34:39 btfmx5 sendmail[581]: u43CYZp5000581: [email protected], ctladdr=alumpi (1000/1000), delay=00:00:04, xdelay=00:00:04, mailer=relay, pri=30018, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (u43CYZx0000582 Message accepted for delivery)
- [email protected]... Connecting to [127.0.0.1] via relay...
- 220 MYSERVER.de ESMTP Sendmail 8.14.4/8.14.4/Debian-8; Tue, 3 May 2016 14:34:35 +0200; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]
- >>> EHLO MYSERVER.de
- 250-MYSERVER.de Hello localhost [127.0.0.1], pleased to meet you
- 250-ENHANCEDSTATUSCODES
- 250-PIPELINING
- 250-EXPN
- 250-VERB
- 250-8BITMIME
- 250-SIZE
- 250-DSN
- 250-ETRN
- 250-AUTH DIGEST-MD5 CRAM-MD5
- 250-DELIVERBY
- 250 HELP
- >>> VERB
- 250 2.0.0 Verbose mode
- >>> MAIL From:<[email protected]> SIZE=18 [email protected]
- 250 2.1.0 <[email protected]>... Sender ok
- >>> RCPT To:<[email protected]>
- >>> DATA
- 250 2.1.5 <[email protected]>... Recipient ok
- 354 Enter mail, end with "." on a line by itself
- >>> .
- 050 <[email protected]>... Connecting to mta7.am0.yahoodns.net. via esmtp...
- 050 220 mta1523.mail.gq1.yahoo.com ESMTP ready
- 050 >>> EHLO MYSERVER.de
- 050 250-mta1523.mail.gq1.yahoo.com
- 050 250-PIPELINING
- 050 250-SIZE 41943040
- 050 250-8BITMIME
- 050 250 STARTTLS
- 050 >>> STARTTLS
- 050 220 Start TLS
- 050 >>> EHLO MYSERVER.de
- 050 250-mta1523.mail.gq1.yahoo.com
- 050 250-PIPELINING
- 050 250-SIZE 41943040
- 050 250 8BITMIME
- 050 >>> MAIL From:<[email protected]> SIZE=340
- 050 250 sender <[email protected]> ok
- 050 >>> RCPT To:<[email protected]>
- 050 >>> DATA
- 050 250 recipient <[email protected]> ok
- 050 354 go ahead
- 050 >>> .
- 050 250 ok dirdel
- 050 <[email protected]>... Sent (ok dirdel)
- 250 2.0.0 u43CYZx0000582 Message accepted for delivery
- [email protected]... Sent (u43CYZx0000582 Message accepted for delivery)
- Closing connection to [127.0.0.1]
- >>> QUIT
- 221 2.0.0 MYSERVER.de closing connection
- 554 Message not allowed - Headers are not RFC compliant[291]
- $toEmail = '...';
- $subject = '...';
- $message = '...';
- $headers = array();
- $headers[] = "MIME-Version: 1.0";
- $headers[] = "Content-type: text/plain; charset=utf-8";
- $headers[] = "From: [email protected]";
- $headers[] = "X-Mailer: PHP/".phpversion();
- if(mail($toEmail, $subject, $message, implode("rn",$headers), '-f [email protected]')) {
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment