 |
|
|
 |
|
|
 |
|
 |
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net;
using System.Net.Mail;
public partial class SendMail : System.Web.UI.Page
{
protected void btnSend_Click(object sender, EventArgs e)
{
System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage();
msg.From = new MailAddress("xxx@yourdomain.com");
msg.To.Add(txtTo.Text);//Text Box for To Address
msg.Subject = txtSubject.Text; //Text Box for subject
msg.IsBodyHtml = true;
msg.Body = txtBody.Text;//Text Box for body
msg.Priority = MailPriority.High;
System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient("relay-hosting.secureserver.net", 25);
client.UseDefaultCredentials = false;
client.Credentials = new System.Net.NetworkCredential("xxx@yourdomain.com", "yourpassword");
client.Port = 25;
client.Host = "relay-hosting.secureserver.net";
client.EnableSsl = false;
object userstate = msg;
client.Send(msg);
}
}
|
|
|
|
 |
|
|
 |
|
 |
I have developed my first web application and this is enjoyed by me n my friends.Now i want to make its exe.Is there any method or way to get that possible?
|
|
|
|
 |
|
 |
you whant to do an installer of yor web application?
|
|
|
|
 |
|
 |
how can i configure smtp in Win 7 ?
|
|
|
|
 |
|
 |
it is not working..
error is "The transport failed to connect to the server"
plz help me
|
|
|
|
 |
|
 |
can't received email although follow all the step of your guide .i haved configured the smtpServer in IIS . anybody can help me ! plz .
|
|
|
|
 |
|
 |
hi,
I got following error.
The transport failed to connect to the server. :: at System.Web.Mail.SmtpMail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.SmtpMail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at _Default.Button1_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\SMTP\WebSite\Default.aspx.cs:line 32
my code is
Server.ScriptTimeout = 10000;
MailMessage msg = new MailMessage();
msg.From = "sanjay.jain@orange-ftgroup.com";
msg.To = "sanjay.jain@orange-ftgroup.com";
msg.Subject = "test";
msg.BodyFormat = MailFormat.Html;
msg.Body = "<html><body>hello world</body></html>";
SmtpMail.SmtpServer = "mail.gtllimited.com";
SmtpMail.Send(msg);
Response.Write("EMAIL SEND");
If i set SmtpMail.SmtpServer="localhost" then i get msg as email send but i havent receive mail.
so plz. guide us
modified on Wednesday, June 4, 2008 7:28 AM
|
|
|
|
 |
|
 |
How to solve this error
In same program. once again config. that server after that get this error
please reply me
[COMException (0x80040213): The transport failed to connect to the server.]
How to solve this error
|
|
|
|
 |
|
 |
hi,
I'm execute yur code with yur step. but under below message was appered please help me
The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available i'm waiting for your positive reply
thank you
paulraj PV
|
|
|
|
 |
|
 |
Have you checked your antivirus software or any other security software? They might have blocked access to PORT 25.
Good luck!
The Geek
http://www.geekays.net/
|
|
|
|
 |
|
 |
Hi,
I am facing same problem.
---The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available.
I am able to configure that emailid in outlook n sending and receiving mail from that ID. what could be the problem.
Help Me out.
Thanks
Saurabh
Saurabh Tripathi
|
|
|
|
 |
|
 |
hey i am getting this error in sending mail
could not acess cdo.Message
|
|
|
|
 |
|
 |
Hi
I am also getting this error when i set the Bodyformat=html.
If i use Bodyformat=text its working fine.
Thanks in advance
Ramesh.A
|
|
|
|
 |
|
 |
I am getting the following error
System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x8004020F): The server rejected one or more recipient addresses. The server response was: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
Is it possible to find out exact recipient addresses, which are rejected by the SMTP server?
Thanks in advance.
Regards
Anees Ahamed.N
|
|
|
|
 |
|
 |
System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server. --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) --- End of inner exception stack trace --- at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at EVC.WebForm2.Button1_Click(Object sender, EventArgs e) in c:\evc\webform2.aspx.cs:line 76
lakshmi
|
|
|
|
 |
|
 |
System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server. --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) --- End of inner exception stack trace --- at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at EVC.WebForm2.Button1_Click(Object sender, EventArgs e) in c:\evc\webform2.aspx.cs:line 76
SmtpMail.SmtpServer = //take the isa server ip or the exchange ip?!!
Thanks,
|
|
|
|
 |
|
 |
I use the code and set iis property is ok!
i click the button(submit mail) then response this word
The Mail has been sent to:
• To: cnlideyong@yahoo.com.cn
• Cc: cnlideyong@yahoo.com.cn
• Bcc: cnlideyong@yahoo.com.cn
but cnlideyong@yahoo.com.cn can't receive the email.
i use other email address ,but the result is the same like this.
|
|
|
|
 |
|
 |
Pwhy no person reply me?
no setting.
|
|
|
|
 |
|
 |
Check the firewall and security issues.
I did the same and i haven't got any error.and set your smtp client to "localhost" and when u run your program just check whether the port number is same as in the code or not.
|
|
|
|
 |
|
 |
Hi,
I think your code is good and worked for what i needed, but im wanting to read more than email address from an sql database and then send an email to them all.
Have you got any code available that will help.
Thanks
Paul
|
|
|
|
 |
|
 |
hello paul
if u have got ne reply for ur question(How to read from a database and send to more than one email address) den plzzzzzz send it me at my email id mosn3@rediffmail.com
regards
Mohsin
|
|
|
|
 |
|
 |
Please insure that you do not setup your SMTP Server as instructed by this tutorial. Opening up SMTP Relay to all IP addresses will allow spammers to use your email server as a relay to send hundreds of thousands of spam emails.
Please manually enter the ip address of the machine that you need to access this server with and NOT allow all ip address to access the server.
|
|
|
|
 |