Click here to Skip to main content
15,789,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi !!!
I have a problem with SMTP server.
I have a SMTP server, when i send mail, it will auto get gmail account to send.
I dont know what happens. I think because of setting of SMTP.
How can it debbug it ??? I have debug in code :
smtpclient.send(mailmessage) From email is correct but when i check in mail box it is not right.

Please help me !!!
[no name] 12-May-14 15:02pm    
Help you with what? If you have your own SMTP mail server, what does gmail have to do with anything?
baotdinh 12-May-14 16:39pm    
I have configured email A in SMTP, i have a email B which is configured in my application, when email in application is null , it will use email in SMTP. But now it always use email A in SMTP.
Is it correct ???

1 solution


this is the only code you use?

The SMTP client objects uses the server settings by default.
I think there is the Gmail-Account set in the server or application settings.

Try the following code:
Dim SmtpObj As New System.Net.Mail.SmtpClien
SmtpObj.Host = ""
SmtpObj.Credentials = New System.Net.NetworkCredential("user", "password")
SmtpObj.EnableSsl = True
SmtpObj.Port = 587

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900