Bonjour,

j'ai un souci avec un script d'envoi de mail depuis que je viens de changer de serveur smtp :

Voila mon script :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
use Net::SMTP;	#Perl librairy, to send MAIL and SMS
	my $smtpserver = "@serveur";
	my $from = "user\@serveur" ;
	my $replyaddr = "user\@serveur";			
	my $to = "user\@serveur";	#Destination mail
 
	my $smtp = Net::SMTP->new("$smtpserver", Timeout => 120, Debug => 1);
 
	$smtp->mail("$from");
	$smtp->to("$to");
	$smtp->data();
	$smtp->datasend("To: ".$to."\n");
	$smtp->datasend("From: ".$from."\n");
	$smtp->datasend("Reply-to: ".$replyaddr."\n") if $replyaddr;
	$smtp->datasend("X-Mailer: Perl Sendmail \n");
	$smtp->datasend("Subject: alarm");	#Subject of your email
	$smtp->datasend("\n");	#Use \n to skip a line									
	$smtp->datasend("My first email!\n");	#Body of the message
	$smtp->dataend();
	$smtp->quit();
et voila l'erreur que j'obtiens en activant le debug :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
Net::SMTP: Net::SMTP(2.26)
Net::SMTP:   Net::Cmd(2.18)
Net::SMTP:     Exporter(5.562)
Net::SMTP:   IO::Socket::INET(1.25)
Net::SMTP:     IO::Socket(1.26)
Net::SMTP:       IO::Handle(1.21)
 
Net::SMTP=GLOB(0x8831b90)<<< 220 FRVELSBHS02.com   Mon, 23 Jun 2008 11:43:16 +0200
Net::SMTP=GLOB(0x8831b90)>>> EHLO localhost.localdomain
Net::SMTP=GLOB(0x8831b90)<<< 250-FRVELSBHS02.com Hello [155.132.232.100]
Net::SMTP=GLOB(0x8831b90)<<< 250-TURN
Net::SMTP=GLOB(0x8831b90)<<< 250-SIZE
Net::SMTP=GLOB(0x8831b90)<<< 250-ETRN
Net::SMTP=GLOB(0x8831b90)<<< 250-PIPELINING
Net::SMTP=GLOB(0x8831b90)<<< 250-DSN
Net::SMTP=GLOB(0x8831b90)<<< 250-ENHANCEDSTATUSCODES
Net::SMTP=GLOB(0x8831b90)<<< 250-8bitmime
Net::SMTP=GLOB(0x8831b90)<<< 250-BINARYMIME
Net::SMTP=GLOB(0x8831b90)<<< 250-CHUNKING
Net::SMTP=GLOB(0x8831b90)<<< 250-VRFY
Net::SMTP=GLOB(0x8831b90)<<< 250-TLS
Net::SMTP=GLOB(0x8831b90)<<< 250-STARTTLS
Net::SMTP=GLOB(0x8831b90)<<< 250-X-EXPS GSSAPI NTLM
Net::SMTP=GLOB(0x8831b90)<<< 250-AUTH GSSAPI NTLM
Net::SMTP=GLOB(0x8831b90)<<< 250-X-LINK2STATE
Net::SMTP=GLOB(0x8831b90)<<< 250-XEXCH50
Net::SMTP=GLOB(0x8831b90)<<< 250 OK
Net::SMTP=GLOB(0x8831b90)>>> MAIL FROM:<user@serveur.fr>
Net::SMTP=GLOB(0x8831b90)<<< 454 5.7.3 Client does not have permission to submit mail to this server.
Net::SMTP=GLOB(0x8831b90)>>> RCPT TO:<user@serveur.fr>
Net::SMTP: Unexpected EOF on command channel at D:\PERL_mail&sms.pl line 12
Est-ce que quelqu'un a une idée ? J'ai lu des choses sur la librairie perl TLS et c'est possible qu'elle résolve mon problème mais je ne sais pas où la télécharger pour mon pc sachant que j'ai XP pro comme OS.. ?


Merci d'avance, bap