S
Scottmat
Hello,
i have configure one server with windows 2003 and i have configure the
server SMTP.
i can use it with microsoft outlook 2007. It's good.
But with my application in vb.net 2005, my code don't function !!
this is my code :
Dim liste_dest As New System.Net.Mail.MailAddressCollection
liste_dest.Add("(e-mail address removed)")
Dim nom_exp As New System.Net.Mail.MailAddress("(e-mail address removed)")
'server smtp
Dim SmtpMail As Net.Mail.SmtpClient = New
Net.Mail.SmtpClient("AdressIPOfMyServer")
'login and pass
Dim login As String = "LoginOfSMTP"
Dim pass As String = "PasswordOfSMTP"
'Object
Dim obj_message As String = "My Object"
'Body message
Dim corps_message As String = "My Body"
Dim mon_mail As New Net.Mail.MailMessage(nom_exp,
liste_dest.Item(0))
With mon_mail
.Subject = obj_message
.Body = corps_message
.IsBodyHtml = False
End With
'Send message
If (login <> "" And pass <> "") Then SmtpMail.Credentials = New
System.Net.NetworkCredential(login, pass)
SmtpMail.DeliveryMethod = Net.Mail.SmtpDeliveryMethod.Network
SmtpMail.Send(mon_mail)
SmtpMail = Nothing
MsgBox("Message Send")
i don't understand,they are any errors in the execution!!
the message was send !
on the server, the log is correct
the data are like with outlook
but i don't receive my message in me account
i have configure one server with windows 2003 and i have configure the
server SMTP.
i can use it with microsoft outlook 2007. It's good.
But with my application in vb.net 2005, my code don't function !!
this is my code :
Dim liste_dest As New System.Net.Mail.MailAddressCollection
liste_dest.Add("(e-mail address removed)")
Dim nom_exp As New System.Net.Mail.MailAddress("(e-mail address removed)")
'server smtp
Dim SmtpMail As Net.Mail.SmtpClient = New
Net.Mail.SmtpClient("AdressIPOfMyServer")
'login and pass
Dim login As String = "LoginOfSMTP"
Dim pass As String = "PasswordOfSMTP"
'Object
Dim obj_message As String = "My Object"
'Body message
Dim corps_message As String = "My Body"
Dim mon_mail As New Net.Mail.MailMessage(nom_exp,
liste_dest.Item(0))
With mon_mail
.Subject = obj_message
.Body = corps_message
.IsBodyHtml = False
End With
'Send message
If (login <> "" And pass <> "") Then SmtpMail.Credentials = New
System.Net.NetworkCredential(login, pass)
SmtpMail.DeliveryMethod = Net.Mail.SmtpDeliveryMethod.Network
SmtpMail.Send(mon_mail)
SmtpMail = Nothing
MsgBox("Message Send")
i don't understand,they are any errors in the execution!!
the message was send !
on the server, the log is correct
the data are like with outlook
but i don't receive my message in me account