Send Mail on local machine

S

Steven K

Hello,

I am using the following to send mail. It works on my web server, but not
on my personal machine (which is running ASP.Net). I tried setting
SmtpMail.SmtpServer to "", but get the following error:
System.Runtime.InteropServices.COMException: The "SendUsing" configuration
value is invalid.

I then tried using: SmtpMail.SmtpServer to "localhost", and got the
following: System.Runtime.InteropServices.COMException: The server rejected
one or more recipient addresses. The server response was: 550 5.7.1 Unable
to relay for (e-mail address removed)

Any help with this would be appreciated.

Sub SendMail()
Dim objMM as New MailMessage()
objMM.To = (e-mail address removed)
objMM.From = tbxHandle.Text & "@lucent.com"
objMM.BodyFormat = MailFormat.Text
objMM.Priority = MailPriority.Normal
objMM.Subject = "ASP.Net CI Confirimation Test"
objMM.Body = tbxHandle.Text & " has submitted form"
SmtpMail.SmtpServer = ""
SmtpMail.Send(objMM)
End Sub
 
C

Curt_C [MVP]

is SMTP setup and running on your local pc?
Otherwise, set it to the server name in the SmtpServer value
 
G

Guest

I have same problem on my local PC.
Can send from Windows App but not from aspx.cs. Here I get same error.
What needs to be done to SMTP setting and how?

Thanks
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top