Slt,
Utiliser plutôt un script vbs comme celui-ci :
Copier/coller dans un fichier texte et renommer : EnvoieCourriel.vbs
' *******************************************************************
'
' Syntaxe d'appel en mode console :
' EnvoieCourriel.vbs "destination@fai.net" "Mon message"
'
' *******************************************************************
'
' * Utilisation de OutlookExpress pour courrier sortant
' * Donner l'adresse smtp
' *
' Déclaration de variables
Dim objMail ' Objet Courriel
Dim oIE ' Objet Navigateur
Dim Reponse ' Chaine de caractères
Dim Message ' Chaine de caractères
dim oArgs, sDestination, sPieceJointe
Set oArgs = WScript.Arguments
If (oArgs.Count > 1) Then
If ( oArgs(0) <> "") Then
sDestination = oArgs(0)
Else
sDestination = "destination@fournisseur.net"
End if
If (oArgs(1) <> "") Then
Reponse = oArgs(1)
Else
Reponse = ""
End if
Else
Wscript.Echo "Arguments incomplet !"
Wscript.Quit
End if
'Création d'une instance du facteur (Outlook Express)
Set objMail = CreateObject("CDO.Message")
'set objMail = Server.CreateObject("CDO.Message")
With objMail
'Adresse source -> Modifiable mais Obligatoire
.From = "monadresse@monfai.net"
'Adresse de destination -> Modifiable mais Obligatoire
.To = "destination@fournisseur.net"
.Subject = "Adresse virtuel ..."
Message = "Salut," & VbCrlf & VbCrlf & "->->-> Automatisme" & VbCrlf & VbCrlf
.TextBody = Message & Reponse
'Adresse smtp du serveur de courrier [ FAI ]-> Obligatoire
.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.monfai.net"
.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Configuration.Fields.Update
.Send
End With
Set objMail = nothing
Wscript.Quit
Lupin