Besoin d'aide

shumi007 Messages postés 24 Date d'inscription vendredi 29 juin 2007 Statut Membre Dernière intervention 9 mai 2010 - 23 nov. 2007 à 13:10
PCPT Messages postés 13272 Date d'inscription lundi 13 décembre 2004 Statut Membre Dernière intervention 3 février 2018 - 24 nov. 2007 à 10:32
bonjour a tous
j'ai besoin daide
voila j'aimerais savoir ou avoir le code permettant d'introduire son serveur smtp de  son choix et le mot de passe avant de pouvoir envoyer un mail
voici le code d'envoi normal 

Option Explicit


Private Sub Form_Load()


    Me.OsenXPForm1.Init Me
   
    cboPriority.ListIndex = 2
   
End Sub


' SendMail
Private Sub cmdSend_Click()


    lstInfo.Clear
   
    If MyWinsock1.SendMail(smtpserver, txtFrom, txtTo, txtSubject, txtMessage, cboPriority.ListIndex + 1, , txtAttach, txtCC, txtBCC) Then
        MsgBoxGT "Message successfull sent.", vbInformation, "Success", 3
    Else
        MsgBoxGT "Cannot sent message.", vbCritical, "Fail", 3
    End If
   
End Sub
 
' Trace sendmail status ...
Private Sub MyWinsock1_SendMailInfo(Info As String)


   Call lstInfo.AddItem(Info, CustomColor:=IIf(Left$(Info, 7) = "Command", &H800000, &H8000&))
   
End Sub


' Progress ...
Private Sub MyWinsock1_SendMailProgress(Progress As Long)
    PbAR.Value = Progress
End Sub


' Show open dialog from txtAttach
Private Sub txtAttach_ButtonClick()
     txtAttach.ShowOpenDialog
End Sub
 

1 réponse

PCPT Messages postés 13272 Date d'inscription lundi 13 décembre 2004 Statut Membre Dernière intervention 3 février 2018 47
24 nov. 2007 à 10:32
salut,

renseigne-toi avec la documentation du contrôle MyWinsock qui doit être fournie

(quoi que de mémoire tu avais demandé il y a peu de faire ce contrôle puisqu'il n'existait pas? ^^)
<hr size="2" width="100%" />Prenez un instant pour répondre à [infomsg_SONDAGE-POP3-POUR-CS_769706.aspx ce sondage] svp
0
Rejoignez-nous