 |
|
 |
while i am trying to send an email
ERROR:
Send Email Failed.Mailbox unavailable. The server response was: 5.7.1 Unable to relay for xyz@gmail.com
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
hello some body please help me i wrote following code // using System; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Web.Mail;
public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {
} protected void Button1_Click(object sender, EventArgs e) {
try { MailMessage mail = new MailMessage(); mail.To = "iamkishore4u.m@gmail.com"; mail.From = "kishore@mail.com"; mail.Subject = "hi"; mail.Body = "hi"; SmtpMail.SmtpServer = "localhost"; SmtpMail .Send (mail ); Label1.Text = "email has been sent:"; } catch (Exception ek) { Label1.Text = ek.Message; } } } ///
my message is going to "queue " but it is not going to my mail box
|
| Sign In·View Thread·PermaLink | 2.00/5 (3 votes) |
|
|
|
 |
|
|
 |
|
 |
when i click the submit button it shows the email is sucesfuly send . but i didnt get any message in my email address. so plz give me a proper solution .
my code is :
protected void Button1_Click(object sender, EventArgs e) { MailMessage mesg = new MailMessage(); SmtpClient smpcl = new SmtpClient(); try { MailAddress fromadd = new MailAddress(TextBox2.Text, TextBox1.Text);
smpcl.Host = "192.168.0.2"; //(here i have given ip address) smpcl.Port = 25;
mesg.From = fromadd;
mesg.To.Add("knm.murali@gmail.com"); mesg.Subject = "Feedback";
mesg.IsBodyHtml = false;
mesg.Body = TextBox3.Text;
smpcl.Send(mesg); Label4.Visible = true;
Label4.Text = "email successfully sent ";
} catch (Exception ex) { Label4.Visible = true; Label4.Text = ex.Message; } }
|
| Sign In·View Thread·PermaLink | 1.50/5 (2 votes) |
|
|
|
 |
|
|
 |
|
 |
hi gowri..
am getting the foll. error, after running your program.. plz give sol...
the error is,
" Send Email Failed. Mailbox unavailable. The server response was: 5.7.1 Unable to relay for xxxxx@xxxxmail.com"
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
hi gowri..
i found the solution for that error..
need to change some settings in IIS..
http://codebetter.com/photos/peter.van.ooijen/images/142330/original.aspx
thanks & regards, N.Chandru
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
hi, Can any body help me how to merge the default signature for everys sending mail as a yahoo,gmail facility i hope u guys are understant what i mean to say ...please let me know how to solve these issue thanks in advance have a nice day
basha
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
 |
this article addresses a solution I was looking for, after 2-3 days of google'ing and testing.
But I still needed to modify it to get what I needed out of it.
I'm creating a form where clients can't send info about friends they want to get in to business with us.
You write in info about you, a message to be send only to his friends, and than a short contact info about there friends only to be sent to us. (3 friends max)
The email I want the info to be sent to, the company email, is getting only the messages that is suppose to go to his friends, but the email to his friends is sending correctly.
here is the code,
"
using System; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Net.Mail;
public partial class _Vinaabending : System.Web.UI.Page { protected void btnSendmail_Click(object sender, EventArgs e) {
// System.Web.Mail.SmtpMail.SmtpServer is obsolete in 2.0 // System.Net.Mail.SmtpClient is the alternate class for this in 2.0 SmtpClient smtpClient = new SmtpClient(); MailMessage message = new MailMessage();
try { // You can specify the host name or ipaddress of your server // Default in IIS will be localhost smtpClient.Host = "smtp.nova.is";
//Default port will be 25 smtpClient.Port = 25;
MailAddress fromAddress = new MailAddress(txtEmail.Text, txtName.Text);
//From address will be given as a MailAddress Object message.From = fromAddress;
// To address collection of MailAddress message.To.Add("main@company.is");
message.Subject = "Vinaábending";
//Body can be Html or text format //Specify true if it is html message message.IsBodyHtml = true;
// Message body content message.Body = "<table border='0' style='width: 100%'><col /><col /><col /><tbody><tr><td>nöfn</td><td align='center'><b>Símanúmer</b></td><td align='center'><b>netfang</b></td></tr><tr><td align='center'><b>" + txtBestFriendName.Text + " </td><td>" + txtBestFriendPhone.Text + " </td><td>" + txtBestFriendEmail.Text + "</td></tr><tr><td>" + name2.Text + "</td><td> " + phone2.Text + "</td><td>" + email2.Text + "</td></tr><tr><td>" + name3.Text + "</td><td>" + phone3.Text + "</td><td>" + email3.Text + "</td></tr></tbody></table>";
// Send SMTP mail smtpClient.Send(message);
lblStatus.Text = "Skilaboð hafa verið send á main@company.is.";
}
catch (Exception ex) { lblStatusNova.Text = "Sending mistókst.<br>" + ex.Message; return; }
try { // You can specify the host name or ipaddress of your server // Default in IIS will be localhost smtpClient.Host = "smtp.nova.is";
//Default port will be 25 smtpClient.Port = 25;
MailAddress fromAddress = new MailAddress("nova@nova.is", "Nova");
//From address will be given as a MailAddress Object message.From = fromAddress;
// To address collection of MailAddress message.To.Add(txtBestFriendEmail.Text);
message.Subject = "Vinaábending um þig";
//Body can be Html or text format //Specify true if it is html message message.IsBodyHtml = true;
// Message body content message.Body = "<h2 style='color:#FF0000'>" + txtfriendmessage.Text + "</h2>";
// Send SMTP mail smtpClient.Send(message);
lblStatus.Text = "Skilaboð hafa verið send á " + txtBestFriendEmail.Text;
}
catch (Exception ex) { lblStatus.Text = "Sending mistókst.<br>" + ex.Message + "Vinsamlegast athugaðu hvort upplýsingar eru réttar "; return; } }
protected void btnReset_Click(object sender, EventArgs e) { txtBestFriendEmail.Text = ""; txtBestFriendName.Text = ""; txtBestFriendPhone.Text = ""; txtEmail.Text = ""; txtfriendmessage.Text = ""; txtName.Text = ""; phone2.Text = ""; name2.Text = ""; email2.Text = ""; name3.Text = ""; email3.Text = ""; phone3.Text = ""; }
}
"
The first try is for the info to be sent to the company.
The later one is to find the first friend to send a message, from the friend that wrote in to the Form.
How ever, the company is getting the friends message to, but not the info.
I hope you understand, and hope you can help me. I need to make two more "try"'es to send messages to two other friends.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
My code is as following
SmtpClient smtpClient = new SmtpClient(); MailMessage message = new MailMessage();
try { MailAddress fromAddress = new MailAddress("piyupatel1@yahoo.com", "piyupatel"); smtpClient.Host = "localhost"; smtpClient.Port = 25; message.From = fromAddress; message.To.Add("pravinpatel@yahoo.com"); message.Subject = "Testing"; message.Body = "Testing"; smtpClient.Send(message) } catch (Exception ex) { Label1.Text=ex.Message; }
i got error like "Mailbox unavailable. The server response was: 5.7.1 Unable to relay for pravinpatel@yahoo.com "
<div class="ForumMod">modified on Sunday, December 14, 2008 12:35 PM</div>
|
| Sign In·View Thread·PermaLink | 1.50/5 (2 votes) |
|
|
|
 |
|
|
 |
|
 |
Hi, Please check ur email provide. It's generally smtp.yourdomain.com
Example: if your email id is piyush@abc.com then smtp.abc.com
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
 |
i m facing tis error....but i am not able to find out the reason... Pls help me out
this is my code..
public partial class _Default : System.Web.UI.Page { #region "Send email" protected void btnSendmail_Click(object sender, EventArgs e) { // System.Web.Mail.SmtpMail.SmtpServer is obsolete in 2.0 // System.Net.Mail.SmtpClient is the alternate class for this in 2.0 SmtpClient smtpClient = new SmtpClient(); MailMessage message = new MailMessage();
try { MailAddress fromAddress = new MailAddress(txtEmail.Text, txtName.Text);
// You can specify the host name or ipaddress of your server // Default in IIS will be localhost smtpClient.Host = "localhost";
//Default port will be 25 smtpClient.Port = 25;
//From address will be given as a MailAddress Object message.From = fromAddress;
// To address collection of MailAddress message.To.Add("admin1@yoursite.com"); message.Subject = "Feedback";
// CC and BCC optional // MailAddressCollection class is used to send the email to various users // You can specify Address as new MailAddress("admin1@yoursite.com") message.CC.Add("admin1@yoursite.com"); message.CC.Add("admin2@yoursite.com");
// You can specify Address directly as string message.Bcc.Add(new MailAddress("admin3@yoursite.com")); message.Bcc.Add(new MailAddress("admin4@yoursite.com"));
//Body can be Html or text format //Specify true if it is html message message.IsBodyHtml = false;
// Message body content message.Body = txtMessage.Text;
// Send SMTP mail smtpClient.Send(message);
lblStatus.Text = "Email successfully sent."; } catch (Exception ex) { lblStatus.Text = "Send Email Failed.<br>" + ex.Message; } } #endregion
Lata
|
| Sign In·View Thread·PermaLink | 1.60/5 (5 votes) |
|
|
|
 |
|
 |
string strTo = "swarna_meena_s@yahoo.co.in"; string strFrom = "meena7227@gmail.com"; string strSubject = "Test";
SmtpMail.Send(strFrom, strTo, strSubject, "test the mail"); SmtpMail.SmtpServer = "localhost";
Response.Write("Email was queued to disk");
i used system.web.mail and system.net.mail as namespace
i am not getting any build error but while sending i am getting this error..........The "SendUsing" configuration value is invalid.....can u pls tell me the solution
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
 |
i have done codings for sending mail in asp.net ...it not showing errors..but i didnt get mail in inbox? what is the pblm ? can u help me?
|
| Sign In·View Thread·PermaLink | 1.75/5 (3 votes) |
|
|
|
 |
|
|
 |
|
 |
Hi Gowri,
Good article.
Is there any way to send mails in RTF format. For example, in your example, if the body text box is a rich text box, how to keep the formated text in message body?
Thanks in advance.
Regards, ----- Sugesh
|
| Sign In·View Thread·PermaLink | 2.40/5 (4 votes) |
|
|
|
 |
|
 |
Hi Sugesh,
I´m with the same problem. I need the body e-mail with RTF format.
If you have any answer about it, please post.
Thanks in advance, ---- Joao Freire
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
 |
Try by, Configuring SMTP Server in the web.config. Add the following snippet under tag.
<system.net> <mailSettings> <smtp> <network host="relayServerHostname" port="portNumber" userName="username" password="password" /> </smtp> </mailSettings> </system.net>
Gowrisankar K Chennai
|
| Sign In·View Thread·PermaLink | 2.67/5 (3 votes) |
|
|
|
 |