Bonjour,
J'utilise XAMPP comme serveur local, je voudrais envoyer des e-mails depuis mon localhost, quelles sont les étapes a suivre.
Cordialement
Version imprimable
Bonjour,
J'utilise XAMPP comme serveur local, je voudrais envoyer des e-mails depuis mon localhost, quelles sont les étapes a suivre.
Cordialement
Bonjour,
Il faut juste demarrer mercury.
A quel niveau as-tu ce message ?
Vois-tu passer ton mail dans Mercury ?
quand je rentre sur http://localhost/xampp/mailform.php je remplis la forme avec l'e-mail de l'expéditeur et le destinataire, il m'affiche ce message d'erreur
Peut-on voir ce mailform.php ?
mailform.php:
langsettings.php: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 <?php include "langsettings.php"; // Requests allowed only from localhosz extract($_POST); extract($_SERVER); $host = "127.0.0.1"; $timeout = "1"; if ($REMOTE_ADDR) { if ($REMOTE_ADDR != $host) { echo "<p><h2> FORBIDDEN FOR CLIENT $REMOTE_ADDR <h2></p>"; exit; } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta name="author" content="Kai Oswald Seidler, Kay Vogelgesang, Carsten Wiedmann"> <link href="xampp.css" rel="stylesheet" type="text/css"> <title>Mercury Mail Server</title> </head> <body> <p> <h1><?php echo $TEXT['mail-head']; ?></h1> <i>(Requests allowed from localhost only)</i><br/><br/> <a href="mercury-help.php"><?php echo $TEXT['mail-hinweise']; ?></a><br><br> <form method="post" action="mailsend.php"> <table width="600" cellpadding="0" cellspacing="0" border="0"> <tr> <td align="left" width="200"><?php echo $TEXT['mail-adress']; ?></td> <td align="left" width="400"><input type="text" name="knownsender" size="40" value="postmaster@localhost"></td> </tr> <tr> <td align="left" width="200"><?php echo $TEXT['mail-adressat']; ?></td> <td align="left" width="400"><input type="text" name="recipients" size="40" value="admin@localhost"></td> </tr> <tr> <td align="left" width="200"><?php echo $TEXT['mail-cc']; ?></td> <td align="left" width="400"><input type="text" name="ccaddress" size="40"></td> </tr> <tr> <td align="left" width="200"><?php echo $TEXT['mail-subject']; ?></td> <td align="left" width="400"><input type="text" name="subject" size="40"></td> </tr> <tr> <td align="left" width="200"> </td> <td align="center" width="400"> </td> </tr> <tr> <td align="left" width="200"><?php echo $TEXT['mail-message']; ?></td> <td align="left" width="400"><textarea rows="6" name="message" cols="34"></textarea></td> </tr> <tr> <td align="left" width="200"> </td> <td align="center" width="400"> </td> </tr> <tr> <td align="left" width="200"> </td> <td align="left" width="400"><input type="submit" value="Send"> * <input type="reset" value="Reset"></td> </tr> </table> </form><br><br> <br> ######## <a href="http://localhost:2224" target="_new"><i>Mercury HTTPD Server listen on Port 2224</i></a> ######## </body> </html>
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 <?php $lang=@file_get_contents("lang.tmp"); @include("lang/languages.php"); @include("lang/en.php"); @include("lang/$lang.php"); if($lang=="zh") { header("Content-Type: text/html; charset=gb2312"); } else if($lang=="jp") { header("Content-Type: text/html; charset=shift-jis"); } ?>
Je n'aimes pas beaucoup tester 10 trucs en même temps ...
Peux tu juste copier ça dans un test.php
et voir quand ça marche
En ne touchant surtout a rien sauf ton mail tonmail@wanadoo.fr
Code:
1
2
3
4
5
6
7 <html><body> <?PHP mail("A: <tonmail@wanadoo.fr>", "Objet: Message du local\n\n\n", "Texte : =========================== \n\n\n\n" , "From: dupond <dudond@wanadoo.fr>"); ?> </body> </html>
voila la reponse du serveur:
Ok donc dans tes trois php.ini tu cherchesCitation:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in .......
SMTP
Code:
1
2
3
4
5
6
7
8
9
10
11 [mail function] ; For Win32 only. SMTP = smtp.wanadoo.fr smtp_port = 25 ; For Win32 only. sendmail_from = xxx@wanadoo.fr ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ;sendmail_path =
Est-ce que mercury est bien demarré ?
Dans Configuration - SMTP server - Connection control
Tu autorises 127.0.0.1 avec l'option "relay" cochée.
Si tu permets, je reviens sur un détail tout bête, quand tu as changés tes INI et configs, bien sur tu as tout arrété et redémarré 8O
dans mercuryCitation:
ou je vais trouver "Configuration"
Bon quand on a tort faut le dire,
Pour EasyPhp c' est impossible sans un serveur SMTP même en changeant les paramétres, :oops:
Je crois que je vais changer pour XAMPP mais j'espéres qu'il est pas trop compliqué 8O
Salut,
As tu un serveur smtp sur ta machine ?