Avec le composant asp smart mail :
function SendMail(From, ToCustomer, Subject, Body, html) if IsNull(ToCustomer) then exit function end if On error resume next dim Mailer Set Mailer = Server.CreateObject("aspSmartMail.SmartMail") Mailer.server = "localhost" if html = true then Mailer.ContentType = "text/html" else Mailer.ContentType = "text/plain " end if From="Mon.adresse_AT_mondomaine.com" Mailer.SenderName = "Relations Clientèle" Mailer.SenderAddress = From Mailer.CharSet = "ISO-8859-15" Mailer.Recipients.Add ToCustomer, ToCustomer Mailer.Subject = Subject Mailer.Body = Body SendMail = Mailer.SendMail SET SendMail = nothing end function
et pour envoyer le mail :
SendMail("monadresse_AT_mondomaine.com", "destinataire_AT_sondomaine.com", "Mon sujet", "Le corps de mon message", true)
Ceci fonctionne avec le composant asp smart mail, si tu n'a pas le même composant tu devra adapter le Server.CreateObject