Send Mail : I don't receive my message

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
 
K

kimiraikkonen

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

Try to specify port number and especially SSL, for instance, they're
required for Gmail at least.
 
S

Scottmat

I can not install the SSL certificate, but normally without this certificate
should each email?


"kimiraikkonen" <[email protected]> a écrit dans le message de
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

Try to specify port number and especially SSL, for instance, they're
required for Gmail at least.
 
A

aaron.kempf

well what happens if username or password is blank? i'd reccomend
always authenticating.

I've been stuck in the same boat and 'always authenticating' seems to
work for me.

-Aaron
 
S

Scottmat

Thank's for you update

he put this message :
The Reponse Server : 530 5.7.3
Client was not anthenticated

I enabled anonymous connections and is the same problem :(

<[email protected]> a écrit dans le message de
well what happens if username or password is blank? i'd reccomend
always authenticating.

I've been stuck in the same boat and 'always authenticating' seems to
work for me.

-Aaron
 
K

kimiraikkonen

I can not install the SSL certificate, but normally without this certificate
should each email?

"kimiraikkonen" <[email protected]> a écrit dans le message de












Try to specify port number and especially SSL, for instance, they're
required for Gmail at least.- Hide quoted text -

- Show quoted text -

You won't install nothing, you just pass SSL parameter if target mail
server requires SSL authentication like Gmail.

So try to set "enableSSL" boolean value to true and try again:

http://msdn2.microsoft.com/en-us/library/system.net.mail.smtpclient.enablessl.aspx
 
S

Steve Gerrard

Scottmat said:
Hello,

i have configure one server with windows 2003 and i have configure the
server SMTP.

Does that mean you are sending the email to this SMTP server? Or are you sending
them to the Exchange server that Outlook is using?

If it is the SMTP server, it is probably just depositing them in a Drop folder,
unless you have configured it to relay them somewhere.
 
S

Scottmat

My problem is solved, it was necessary to check TLS encryption

No, I use my SMTP server as a relay.

Thank you all :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top