473,387 Members | 1,493 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,387 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 1576
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.