Sending Mail Problem
-
This is my code to send an email! but it didnt work
private void SendMail(string from, string body)
{string mailservername = "mail.myURL.com"; string subject = "Contact Us FeedBack"; MailMessage message = new MailMessage(from,"info@mowjelectric.com",subject,body); SmtpClient mailclient = new SmtpClient(); mailclient.Host = mailservername; mailclient.Send(message); message.Dispose(); }
and I manipulate ASP.NET Configuraton. and change SMTP Server name to : "mail.myURL.com" Any Idea? :)
[]D @ []v[] []D @ []v[]
-
This is my code to send an email! but it didnt work
private void SendMail(string from, string body)
{string mailservername = "mail.myURL.com"; string subject = "Contact Us FeedBack"; MailMessage message = new MailMessage(from,"info@mowjelectric.com",subject,body); SmtpClient mailclient = new SmtpClient(); mailclient.Host = mailservername; mailclient.Send(message); message.Dispose(); }
and I manipulate ASP.NET Configuraton. and change SMTP Server name to : "mail.myURL.com" Any Idea? :)
[]D @ []v[] []D @ []v[]
pampam110 wrote:
but it didnt work
What do you mean by didn't work? Are you getting any error ? If yes, then what ?
pampam110 wrote:
string mailservername = "mail.myURL.com";
pampam110 wrote:
mailclient.Host = mailservername;
Does you SMTP server configure properly ?
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
-
pampam110 wrote:
but it didnt work
What do you mean by didn't work? Are you getting any error ? If yes, then what ?
pampam110 wrote:
string mailservername = "mail.myURL.com";
pampam110 wrote:
mailclient.Host = mailservername;
Does you SMTP server configure properly ?
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
Abhijit Jana wrote:
What do you mean by didn't work? Are you getting any error ? If yes, then what ?
No Error. I mean This Code didnt send any email :(
Abhijit Jana wrote:
Does you SMTP server configure properly ?
How Can i Configure it? I talk to where i buy Host and Domain, But they didnt help me. :|
[]D @ []v[] []D @ []v[]
-
Abhijit Jana wrote:
What do you mean by didn't work? Are you getting any error ? If yes, then what ?
No Error. I mean This Code didnt send any email :(
Abhijit Jana wrote:
Does you SMTP server configure properly ?
How Can i Configure it? I talk to where i buy Host and Domain, But they didnt help me. :|
[]D @ []v[] []D @ []v[]
If you are using SMTP Server of any web hosting site, I guess they can only help you to do it. Or Read some manual for that hosting site.
pampam110 wrote:
I talk to where i buy Host and Domain, But they didnt help me
:doh:
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
-
If you are using SMTP Server of any web hosting site, I guess they can only help you to do it. Or Read some manual for that hosting site.
pampam110 wrote:
I talk to where i buy Host and Domain, But they didnt help me
:doh:
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
Thanks for your help! I Check My Mail Box at http://mail.myURL.com/ "mail.myURL.com" is it my SMTP Server ? and another question is how can find my SMTP Server except Read Manual for this hosting site? :confused:
[]D @ []v[] []D @ []v[]
-
Thanks for your help! I Check My Mail Box at http://mail.myURL.com/ "mail.myURL.com" is it my SMTP Server ? and another question is how can find my SMTP Server except Read Manual for this hosting site? :confused:
[]D @ []v[] []D @ []v[]
Try to find out with Provider if there mails are persisting in mail queue or not. OR is there any exception are raising in your application.
Parwej Ahamad http://parwej.wordpress.com/
-
This is my code to send an email! but it didnt work
private void SendMail(string from, string body)
{string mailservername = "mail.myURL.com"; string subject = "Contact Us FeedBack"; MailMessage message = new MailMessage(from,"info@mowjelectric.com",subject,body); SmtpClient mailclient = new SmtpClient(); mailclient.Host = mailservername; mailclient.Send(message); message.Dispose(); }
and I manipulate ASP.NET Configuraton. and change SMTP Server name to : "mail.myURL.com" Any Idea? :)
[]D @ []v[] []D @ []v[]
-
you need to contact u r host and ask them about email settings. u can try to set SmtpServer property to '127.0.0.1'
my website is : www.mowjelectric.com and my smtp is : mail.mowjelectric.com!
private void SendMail(string from, string body)
{
string mailservername = "mail.mowjelectric.com";
string subject = "Contact Us FeedBack";
MailMessage message = new MailMessage(from,"info@mowjelectric.com",subject,body);
SmtpClient mailclient = new SmtpClient();
mailclient.Host = mailservername;
mailclient.Send(message);
message.Dispose();
}Can u take a look in my code? Thanks!
[]D @ []v[] []D @ []v[]
-
This is my code to send an email! but it didnt work
private void SendMail(string from, string body)
{string mailservername = "mail.myURL.com"; string subject = "Contact Us FeedBack"; MailMessage message = new MailMessage(from,"info@mowjelectric.com",subject,body); SmtpClient mailclient = new SmtpClient(); mailclient.Host = mailservername; mailclient.Send(message); message.Dispose(); }
and I manipulate ASP.NET Configuraton. and change SMTP Server name to : "mail.myURL.com" Any Idea? :)
[]D @ []v[] []D @ []v[]
Does your mail server requires authentication .. . If so then login using authentication before sending mails.:rose:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.