Bonjour,
J'ai une macro pour envoyer des mails qui marche très bien. Cependant, je dois changer de boite mail et ne sais pas comment l'adapter avec google gmail.
Private Sub CommandButton1_Click()
Dim destinataire, sujet, texte, nom, ProgThunderbird, monCourriel, PieceJointe, i
If Me.TextBox1.Value = "" Then
MsgBox "Veuillez entrer une adresse mail"
Else
destinataire = TextBox1.Value
sujet = TextBox3.Value
PieceJointe = TextBox4.Value
texte = Replace(TextBox5.Value, ",", "%2c")
ProgThunderbird = "C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe"
monCourriel = " -compose " & "to=" & destinataire & "," & "subject=" & sujet & "," & "body=" & texte & "," & "attachment=" & PieceJointe
Shell ProgThunderbird & monCourriel, vbNormalFocus
'SendKeys "^{ENTER}", True 'Envoi automatique
SendKeys "^+{ENTER}", True 'Dossier Messages en attente
MsgBox "Mail envoyé avec succès", vbInformation, ("Message de notification")
Me.Hide
End If
End Sub
Merci d'avance pour votre aide