Envoi mail par CDO - Courrier Indésirable
Bonjour,
Lorsque j'envoi un mail en utilisant l'outil CDO, mes mails arrivent automatiquement dans le courrier indésirable... Savez vous comment je peux faire pour qu'ils arrivent dans la boite de réception ?
Mon code :
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
|
Set objMessage = CreateObject("CDO.Message")
if bDebug then MsgBox "Objet : " & sObject
objMessage.Subject = sObject
objMessage.Sender = Cstr(sFromAdress)
objMessage.To = Cstr(sToAdress)
sCorps = mdata.readData(insContenu)
objMessage.TextBody = sCorps
if bDebug then MsgBox "Corps du mail : " & sCorps
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "elancdd01"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.Send
Set objMessage = Nothing
If ErrorCode() = 0 then MsgBox ("Mail correctement envoyé") |
Titoune