VBS client mail

Florent -  
miro_marou Messages postés 191 Statut Membre -
Bonjour,

voila je fais appelle a tout programmeur en visual basic qui pourrait m'aider,
je recherche un tutoriel pour me créer un client mail , que je puisse envoyer un message avec une pièces joints.

merci de votre compréhension merci .

1 réponse

  1. miro_marou Messages postés 191 Statut Membre 17
     
    Set Mail = CreateObject("CDO.Message")
    With Mail
    .From = "de@hh.cc"
    .To = "à@dfdf.fd"
    .subject = "sujet"
    .TextBody = "texte"
    .AddAttachment ("fichier")
    .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") ="2"
    .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp server"
    .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = "smtp port"
    .Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = true
    .Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = true
    .Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "mon e_mail user name"
    .Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "mon e_mail password"
    .Configuration.Fields.Update

    .Send
    End With
    0