probleme avec l'envoi de courriel en pb
Publié : sam. 04/févr./2017 19:49
Bonjour, j'utilise un code simple pour envoyer des courriels dans une application. ça allait bien jusqu'à ce que gmail refuse d'envoyer mes courriels quand mes clients utilisent ma fonction. Ce n'est pas régulier. J'ai essayer un mode SSL mais le courriel n'arrive pas à partir..
Je suis embêté. Le site hostpapa accepte le protocole SSL
Merci de votre collaboration

Code : Tout sélectionner
If CreateMail(#file18, "finances@yrtechnosoft", "Send email confirmation")
SetMailBody(#file18, "Confirmation email" + #CRLF$ +
"thanks" + #CRLF$ +
"for your support !")
; MessageRequester("nom fichier",nomFich$)
AddMailAttachment(#file18, nomFich$ , nomFich$+".dat")
; Change the recipients to real one
AddMailRecipient(#file18, "finances@yrtechnosoft.com", #PB_Mail_To)
AddMailRecipient(#file18, "store@yrtechnosoft.com", #PB_Mail_Cc)
; Set the SMTP server to use
; Result = SendMail(#file18, "hp184.hostpapa.com", 465 , #PB_Mail_UseSSL ,"xxxxxxx@yrtechnosoft.com","xxxxxxx")
Result = SendMail(#file18, "mail.yrtechnosoft.com", 587, #PB_Mail_Asynchronous ,"xxxxxxx@yrtechnosoft.com","xxxxxxx")
; les xxxxxxx remplacent le bon courriel et le bon mot de passe.... #file18 est initialisé... la première ligne "result = ..." ne parvient pas à envoyer le courriel
; la seconde ligne "result = ...." y arrive mais gmail bloque mon fichier qui a une extension *.dat
Repeat
Progress = MailProgress(#file18)
Delay(300)
Until Progress = #PB_Mail_Finished Or Progress = #PB_Mail_Error
If Progress = #PB_Mail_Finished
MessageRequester("Information", "Mail correctly sent !" + #CRLF$ + "you will receive your key in the next 24 to 48 hours, if you use gmail look into spam folder")
Else
MessageRequester("Error", "Can't sent the mail !")
EndIf
EndIf
Je suis embêté. Le site hostpapa accepte le protocole SSL
Merci de votre collaboration

