473,396 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

sending email please somebody help Im confuseed

hi I have this code
MailMessage objEmail = new MailMessage();

objEmail.To = "ma***@yahoo.com";

objEmail.From = "IN**@FLNE.COM";

objEmail.Cc = "ms****@yahoo.com";

objEmail.Subject = "Test Email";

objEmail.Body = "test" ;

objEmail.Priority = MailPriority.High;
//SmtpMail.SmtpServer =Request.ServerVariables["SERVER_NAME"].ToString() ;

try

{
SmtpMail.SmtpServer = "localhost"; //127.0.0.1 works too

SmtpMail.Send(objEmail);

Response.Write("Your Email has been sent sucessfully -Thank You");

}

catch (Exception exc)

{

Response.Write("Send failure: " + exc.ToString());

}

and in iis I set relay for 127.0.0.1 and Allow all computers which
successfully authenticate to relay

and the IPaddress is all assigne if I change it to my ip addrees IOll have
this error

The transport failed to connect to the server.
ohter wise it doisent show any error and dosent sent any thing whats wrong?

Regards
Jul 21 '05 #1
3 1577
pm
Do you have the mail server set up?

"mahsa" wrote:
hi I have this code
MailMessage objEmail = new MailMessage();

objEmail.To = "ma***@yahoo.com";

objEmail.From = "IN**@FLNE.COM";

objEmail.Cc = "ms****@yahoo.com";

objEmail.Subject = "Test Email";

objEmail.Body = "test" ;

objEmail.Priority = MailPriority.High;
//SmtpMail.SmtpServer =Request.ServerVariables["SERVER_NAME"].ToString() ;

try

{
SmtpMail.SmtpServer = "localhost"; //127.0.0.1 works too

SmtpMail.Send(objEmail);

Response.Write("Your Email has been sent sucessfully -Thank You");

}

catch (Exception exc)

{

Response.Write("Send failure: " + exc.ToString());

}

and in iis I set relay for 127.0.0.1 and Allow all computers which
successfully authenticate to relay

and the IPaddress is all assigne if I change it to my ip addrees IOll have
this error

The transport failed to connect to the server.
ohter wise it doisent show any error and dosent sent any thing whats wrong?

Regards

Jul 21 '05 #2
dear mahsa!

I get the same answer when I do this in VB. I'm using objects
CDO.Message and CDO.Configuration. What objects do you use?
Henrik

pm wrote:
Do you have the mail server set up?

"mahsa" wrote:
hi I have this code
MailMessage objEmail = new MailMessage();

objEmail.To = "ma***@yahoo.com";

objEmail.From = "IN**@FLNE.COM";

objEmail.Cc = "ms****@yahoo.com";

objEmail.Subject = "Test Email";

objEmail.Body = "test" ;

objEmail.Priority = MailPriority.High;
//SmtpMail.SmtpServer =Request.ServerVariables["SERVER_NAME"].ToString() ;

try

{
SmtpMail.SmtpServer = "localhost"; //127.0.0.1 works too

SmtpMail.Send(objEmail);

Response.Write("Your Email has been sent sucessfully -Thank You");

}

catch (Exception exc)

{

Response.Write("Send failure: " + exc.ToString());

}

and in iis I set relay for 127.0.0.1 and Allow all computers which
successfully authenticate to relay

and the IPaddress is all assigne if I change it to my ip addrees IOll have
this error

The transport failed to connect to the server.
ohter wise it doisent show any error and dosent sent any thing whats wrong?

Regards


--
__________________________________________
Henrik Bergman, X-OBI, mob 070-866 87 72
e-mail: he************@x-obi.com

Jul 21 '05 #3
I use smtp

"Henrik Bergman" wrote:
dear mahsa!

I get the same answer when I do this in VB. I'm using objects
CDO.Message and CDO.Configuration. What objects do you use?
Henrik

pm wrote:
Do you have the mail server set up?

"mahsa" wrote:
hi I have this code
MailMessage objEmail = new MailMessage();

objEmail.To = "ma***@yahoo.com";

objEmail.From = "IN**@FLNE.COM";

objEmail.Cc = "ms****@yahoo.com";

objEmail.Subject = "Test Email";

objEmail.Body = "test" ;

objEmail.Priority = MailPriority.High;
//SmtpMail.SmtpServer =Request.ServerVariables["SERVER_NAME"].ToString() ;

try

{
SmtpMail.SmtpServer = "localhost"; //127.0.0.1 works too

SmtpMail.Send(objEmail);

Response.Write("Your Email has been sent sucessfully -Thank You");

}

catch (Exception exc)

{

Response.Write("Send failure: " + exc.ToString());

}

and in iis I set relay for 127.0.0.1 and Allow all computers which
successfully authenticate to relay

and the IPaddress is all assigne if I change it to my ip addrees IOll have
this error

The transport failed to connect to the server.
ohter wise it doisent show any error and dosent sent any thing whats wrong?

Regards


--
__________________________________________
Henrik Bergman, X-OBI, mob 070-866 87 72
e-mail: he************@x-obi.com

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Sven Templin | last post by:
Hello all, our configuration is as following described: - OS: Windows 2000 - Apache server 1.3 - Php 3.8 - MS outlook client 2000 _and_ no SMTP server available in the whole intranet.
10
by: Stuart Mueller | last post by:
I have an exchange server, that I sometimes use to perform mail shots to clients on our database, these can be upwards of 1000 at a time. As we don't want different clients to see who we are...
5
by: Vishal | last post by:
Hello, I already asked this question in the ASP.NET forums, but no help came. So I am hoping that somebody can help me out. This is really very URGENT me. For my e-commerce application, I...
6
by: Eduardo Rosa | last post by:
Somebody knows how I queue email using .Net? thanks a lot
3
by: mahsa | last post by:
hi I have this code MailMessage objEmail = new MailMessage(); objEmail.To = "ma_em@yahoo.com"; objEmail.From = "INFO@FLNE.COM"; objEmail.Cc = "msa_em@yahoo.com"; objEmail.Subject = "Test...
6
by: Maxelcat | last post by:
Hi - getting very frustrated. I would really appreciate some help here! trying to send email via a form from my website. Have to use .asp and I have been round and round the houses trying to get...
3
by: JaffaCakes | last post by:
I want to send an email confirmation after a user completes a form on our Internet page. I am testing this with the System.Web.Mail.SmtpMail class. If I do a SmtpMail.Send then the message takes...
5
by: Jai | last post by:
Hi, I am in a problem of sending mass emails(newsletter) to my website members. Actually my problem is this: I want to send newsletter to my website members. But I had given a facility for...
9
by: JoeP | last post by:
Hi All, How can I find the reason for such an error: Failure sending mail. Some Code... oMailMessage.IsBodyHtml = False oMailMessage.Body = cEmailBody Dim oSMTP As New SmtpClient...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.