Ik gebruik PHPmailer i.c.m. de SMTP-server van mijn hosting provider. Dit omdat Gmail mijn mails niet goed kan verzenden
. E-mails naar Hotmail komt vrijwel direct aan, maar mails richting Gmail komen helemaal niet aan (dus ook niet in spamfilter).
Weet iemand waar dit aan ligt?
debug:
Weet iemand waar dit aan ligt?
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
| include("../phpmailer/class.phpmailer.php"); include("../phpmailer/class.smtp.php"); $mail=new PHPMailer(); $mail->IsSMTP(); $mail->SMTPAuth = true; // enable SMTP authentication $mail->Host = "server"; // SMTP server $mail->Username = "stephan@*****.nl"; $mail->Password = "********"; $mail->SMTPDebug = true; $mail->From = "stephan@*****.nl"; $mail->FromName = "********"; $mail->Subject = $_POST['onderwerp']; $mail->Body = nl2br($_POST['bericht']); $mail->AltBody = "Je kunt deze mail helaas niet openen, omdat je e-mailprogramma geen HTML ondersteunt."; $mail->IsHTML(true); // send as HTML $mail->WordWrap = 50; // set word wrap $mail->AddAddress("*****@gmail.com", "Stephan Vierkant"); if(!$mail->Send()) { echo $mail->ErrorInfo; } else { echo "<p>Verstuurd!</p>"; } |
debug:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
| SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "220 web02.[provider].nl ESMTP Exim 4.69 Mon, 29 Sep 2008 20:49:45 +0200" SMTP -> get_lines(): $data is "220 web02.[provider].nl ESMTP Exim 4.69 Mon, 29 Sep 2008 20:49:45 +0200" SMTP -> FROM SERVER: 220 web02.[provider].nl ESMTP Exim 4.69 Mon, 29 Sep 2008 20:49:45 +0200 SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "250-web02.[provider].nl Hello web02.[provider].nl [123.45.67.89]" SMTP -> get_lines(): $data is "250-web02.[provider].nl Hello web02.[provider].nl [123.45.67.89]" SMTP -> get_lines(): $data was "250-web02.[provider].nl Hello web02.[provider].nl [123.45.67.89]" SMTP -> get_lines(): $str is "250-SIZE 20971520" SMTP -> get_lines(): $data is "250-web02.[provider].nl Hello web02.[provider].nl [123.45.67.89] 250-SIZE 20971520" SMTP -> get_lines(): $data was "250-web02.[provider].nl Hello web02.[provider].nl [123.45.67.89] 250-SIZE 20971520" SMTP -> get_lines(): $str is "250-PIPELINING" SMTP -> get_lines(): $data is "250-web02.[provider].nl Hello web02.[provider].nl [123.45.67.89] 250-SIZE 20971520 250-PIPELINING" SMTP -> get_lines(): $data was "250-web02.[provider].nl Hello web02.[provider].nl [123.45.67.89] 250-SIZE 20971520 250-PIPELINING" SMTP -> get_lines(): $str is "250-AUTH PLAIN LOGIN" SMTP -> get_lines(): $data is "250-web02.[provider].nl Hello web02.[provider].nl [123.45.67.89] 250-SIZE 20971520 250-PIPELINING 250-AUTH PLAIN LOGIN" SMTP -> get_lines(): $data was "250-web02.[provider].nl Hello web02.[provider].nl [123.45.67.89] 250-SIZE 20971520 250-PIPELINING 250-AUTH PLAIN LOGIN" SMTP -> get_lines(): $str is "250 HELP" SMTP -> get_lines(): $data is "250-web02.[provider].nl Hello web02.[provider].nl [123.45.67.89] 250-SIZE 20971520 250-PIPELINING 250-AUTH PLAIN LOGIN 250 HELP" SMTP -> FROM SERVER: 250-web02.[provider].nl Hello web02.[provider].nl [123.45.67.89] 250-SIZE 20971520 250-PIPELINING 250-AUTH PLAIN LOGIN 250 HELP SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "334 VXNlcm5hbWU6" SMTP -> get_lines(): $data is "334 VXNlcm5hbWU6" SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "334 UGFzc3dvcmQ6" SMTP -> get_lines(): $data is "334 UGFzc3dvcmQ6" SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "235 Authentication succeeded" SMTP -> get_lines(): $data is "235 Authentication succeeded" SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "250 OK" SMTP -> get_lines(): $data is "250 OK" SMTP -> FROM SERVER: 250 OK SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "250 Accepted" SMTP -> get_lines(): $data is "250 Accepted" SMTP -> FROM SERVER: 250 Accepted SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "250 Accepted" SMTP -> get_lines(): $data is "250 Accepted" SMTP -> FROM SERVER: 250 Accepted SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "250 Accepted" SMTP -> get_lines(): $data is "250 Accepted" SMTP -> FROM SERVER: 250 Accepted SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "354 Enter message, ending with "." on a line by itself" SMTP -> get_lines(): $data is "354 Enter message, ending with "." on a line by itself" SMTP -> FROM SERVER: 354 Enter message, ending with "." on a line by itself SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "250 OK id=1KkNoX-0004uB-1X" SMTP -> get_lines(): $data is "250 OK id=1KkNoX-0004uB-1X" SMTP -> FROM SERVER: 250 OK id=1KkNoX-0004uB-1X SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "221 web02.[provider].nl closing connection" SMTP -> get_lines(): $data is "221 web02.[provider].nl closing connection" SMTP -> FROM SERVER: 221 web02.[provider].nl closing connection |