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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
| Dim iMsg As Object
Dim iConf As Object
Dim strbody As String
Dim Flds As Variant
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "xxxx@gmail.com"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xxxx"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
With iMsg
Set .Configuration = iConf
.To = UserForm1.email2.Value
.CC = ""
.BCC = ""
.From = """ASSOCIATION xxxx"" <xxxx@gmail.com>"
.Subject = "Confirmation d'inscription"
.textBody = "Bonjour " & UserForm1.Prenom2.Value & "," & vbCrLf & "" & vbCrLf _
& "Nous confirmons ton inscription au xxxx." & vbCrLf _
& "Merci de vérifier tes informations :" & vbCrLf & vbCrLf _
& "NOM : " & UserForm1.Nom2.Value & vbCrLf _
& "PRENOM : " & UserForm1.Prenom2.Value & vbCrLf & "" & vbCrLf _
& "ADRESSE : " & UserForm1.Adresse_1.Value & vbCrLf & UserForm1.Adresse_2.Value & vbCrLf & UserForm1.Code_postal.Value & " " & UserForm1.Ville.Value & vbCrLf & "" & vbCrLf _
& "DATE DE NAISSANCE : " & UserForm1.naisasnce2.Value & vbCrLf _
& "TELEPHONE : " & UserForm1.Telephone.Value & vbCrLf _
& "ADRESSE MAIL : " & UserForm1.email2.Value & vbCrLf & "" & vbCrLf _
& "MATERIEL : " & UserForm1.materiel_resume.Value & vbCrLf & "" & vbCrLf _
& "ASSURANCE : " & a & vbCrLf & "" & vbCrLf _
& "TRANSPORT : " & UserForm1.transport.Value & vbCrLf & "" & vbCrLf _
& "PAIEMENT :" & vbCrLf & "" & vbCrLf _
& "Cheque d'acompte : " & "103" & " , " & "Chèque " & cheques.etablissement_acompte.Value & " Nº " & cheques.cheque_acompte.Value & " de M./Mme/Mlle " & cheques.titulaire_acompte.Value & " (sera encaissé à partir du 12 novembre 2008)" & vbCrLf _
& "Cheque de Solde : " & cheques.solde.Value & " , " & "Chèque " & cheques.etablissement_solde.Value & " Nº " & cheques.cheque_solde.Value & " de M./Mme/Mlle " & cheques.titulaire_solde.Value & " (sera encaissé à partir du 15 décembre 2008)" & vbCrLf _
& "Cheque de caution personnelle : " & "250" & " , " & "Chèque " & cheques.etablissement_personnelle.Value & " Nº " & cheques.cheque_personnelle.Value & " de M./Mme/Mlle " & cheques.titulaire_personnelle.Value & vbCrLf _
& "Cheque de caution solidaire : " & "20" & " , " & "Chèque " & cheques.etablissement_solidaire.Value & " Nº " & cheques.cheque_solidaire.Value & " de M./Mme/Mlle " & cheques.titulaire_solidaire.Value & vbCrLf & " " & vbCrLf _
& "Les chèques de caution seront encaissés en cas de dégâts occasionnés par le fait du participant (caution personnelle) ou d'un participant ou groupe de participants non identifié (caution solidaire)." & vbCrLf & "" & vbCrLf _
& "Schoolement Vôtre" & vbCrLf & "" & vbCrLf _
& "L'équipe xxxx" & vbCrLf & "Mail. : <a href="mailto:xxxx@gmail.com">xxxx@gmail.com</a>"
.Send
End With
MsgBox "Votre message a bien été envoyé!" |
Partager