Can't send mail on localhost
-
hi guys, i try to send a mail like this:
MailMessage mailMsg = new MailMessage(); mailMsg.From = new MailAddress("localhost", "Webmaster"); mailMsg.To.Add(new MailAddress("localhost", "Client guy")); mailMsg.Subject = "Message Subject"; mailMsg.Body = msgBody; mailMsg.IsBodyHtml = true; mailMsg.Priority = MailPriority.High; SmtpClient smtp = new SmtpClient("localhost"); smtp.Send(mailMsg);
but then i get this error: <code>The specified string is not in the form required for an e-mail address. The smtp has already been set up from IIS. i just want to test how to send mail on my local system. how do i do this?He who goes for revenge must first dig two graves.
-
hi guys, i try to send a mail like this:
MailMessage mailMsg = new MailMessage(); mailMsg.From = new MailAddress("localhost", "Webmaster"); mailMsg.To.Add(new MailAddress("localhost", "Client guy")); mailMsg.Subject = "Message Subject"; mailMsg.Body = msgBody; mailMsg.IsBodyHtml = true; mailMsg.Priority = MailPriority.High; SmtpClient smtp = new SmtpClient("localhost"); smtp.Send(mailMsg);
but then i get this error: <code>The specified string is not in the form required for an e-mail address. The smtp has already been set up from IIS. i just want to test how to send mail on my local system. how do i do this?He who goes for revenge must first dig two graves.
Creamboy wrote:
The specified string is not in the form required for an e-mail address.
This error means, there is something wrong with the email address you using. Make sure the email address is correct.
Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
-
Creamboy wrote:
The specified string is not in the form required for an e-mail address.
This error means, there is something wrong with the email address you using. Make sure the email address is correct.
Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
Yusuf.A wrote:
This error means, there is something wrong with the email address you using. Make sure the email address is correct.
I know that. I'm only really asking: what do i put in there to send a mail to my local server?
He who goes for revenge must first dig two graves.
-
Yusuf.A wrote:
This error means, there is something wrong with the email address you using. Make sure the email address is correct.
I know that. I'm only really asking: what do i put in there to send a mail to my local server?
He who goes for revenge must first dig two graves.
-
hi guys, i try to send a mail like this:
MailMessage mailMsg = new MailMessage(); mailMsg.From = new MailAddress("localhost", "Webmaster"); mailMsg.To.Add(new MailAddress("localhost", "Client guy")); mailMsg.Subject = "Message Subject"; mailMsg.Body = msgBody; mailMsg.IsBodyHtml = true; mailMsg.Priority = MailPriority.High; SmtpClient smtp = new SmtpClient("localhost"); smtp.Send(mailMsg);
but then i get this error: <code>The specified string is not in the form required for an e-mail address. The smtp has already been set up from IIS. i just want to test how to send mail on my local system. how do i do this?He who goes for revenge must first dig two graves.
Creamboy wrote:
mailMsg.From = new MailAddress("localhost", "Webmaster"); mailMsg.To.Add(new MailAddress("localhost", "Client guy"));
Change "localhost" to a valid email address.
-
hi guys, i try to send a mail like this:
MailMessage mailMsg = new MailMessage(); mailMsg.From = new MailAddress("localhost", "Webmaster"); mailMsg.To.Add(new MailAddress("localhost", "Client guy")); mailMsg.Subject = "Message Subject"; mailMsg.Body = msgBody; mailMsg.IsBodyHtml = true; mailMsg.Priority = MailPriority.High; SmtpClient smtp = new SmtpClient("localhost"); smtp.Send(mailMsg);
but then i get this error: <code>The specified string is not in the form required for an e-mail address. The smtp has already been set up from IIS. i just want to test how to send mail on my local system. how do i do this?He who goes for revenge must first dig two graves.
It's like you know nothing about ASP.NET, the internet, or basic English comprehension.....
Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
-
hi guys, i try to send a mail like this:
MailMessage mailMsg = new MailMessage(); mailMsg.From = new MailAddress("localhost", "Webmaster"); mailMsg.To.Add(new MailAddress("localhost", "Client guy")); mailMsg.Subject = "Message Subject"; mailMsg.Body = msgBody; mailMsg.IsBodyHtml = true; mailMsg.Priority = MailPriority.High; SmtpClient smtp = new SmtpClient("localhost"); smtp.Send(mailMsg);
but then i get this error: <code>The specified string is not in the form required for an e-mail address. The smtp has already been set up from IIS. i just want to test how to send mail on my local system. how do i do this?He who goes for revenge must first dig two graves.
MailMessage mail = new MailMessage(); mail.To.Add("demo@gmail.com"); mail.From = new System.Net.Mail.MailAddress("from@gmail.com"); mail.Subject = "Subject"; mail.Body = "hello, this is test mail"; mail.IsBodyHtml = true; SmtpClient client = new SmtpClient(server name); client.Credentials = new NetworkCredential("username", "password"); client.Send(mail); Response.Write("send mail!");
-
MailMessage mail = new MailMessage(); mail.To.Add("demo@gmail.com"); mail.From = new System.Net.Mail.MailAddress("from@gmail.com"); mail.Subject = "Subject"; mail.Body = "hello, this is test mail"; mail.IsBodyHtml = true; SmtpClient client = new SmtpClient(server name); client.Credentials = new NetworkCredential("username", "password"); client.Send(mail); Response.Write("send mail!");
I'm also doing the same, but the mail goes to the Queue folder only.... what to do???