Solved

Setting up Windows XP Professional to Send email

Posted on 2004-08-14
7
234 Views
Last Modified: 2012-06-21
Dear Expert,
   I have a Windows XP Box where I have an aspnet web project setup. The application provides the user with the ability to register and an email is generated and sent once the user is registered. My problem is the following:

1) I have set up my smtp server to relay from only my machine given the IP Address 127.0.0.1, the domain is my computer name, I have entered a masquerade domain as well as a fully qualified domain name. Everything worked perfectly, but when I upgraded my machine to Office 2003, It stop relaying email. After uninstalling office 2003 and reinstalling office 2000, I set up outlook with my usual ISP info, but still nothing. Is there something else that I need to do.

Regards

K
0
Comment
Question by:Khopkins32
  • 4
  • 3
7 Comments
 
LVL 18

Expert Comment

by:tusharashah
ID: 11802720
It seems that you are getting a well known SMTP Error Msg :550, which means Unable to relay for user xy. To be short the SMTP has verified that you are not allowed to send a mail with the current user.

Try adding this line anywhere before you send message.

>>> msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",2);

it that dosnt help you, what error are you getting?

-tushar
0
 

Author Comment

by:Khopkins32
ID: 11822383
Hi tushar,
  Thanks for the response. Unfortunately, I am not getting any errors, At first the generated email where being stored in the \BadMail directory. I then decided to reinstall the smtp server again. Now all the contents contained within the folders of the mailroot directory are empty as they should be, but yet no email is generated.

Any suggestions would be greatly appreciated.

-K
0
 
LVL 18

Expert Comment

by:tusharashah
ID: 11842304
can you post your mailing code. you must be doing right, but i just want to put one doubt aside that there's something in code.

also try removing your IP address (127.0.0.1) from Relay Restriction & Select "All except the list below".  So we can put one more thing aside, that there's something to do with IP address

-tushar
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:Khopkins32
ID: 11848741
This is a code snippet that I use to generate the email.

public void emailNewClientDefault()
{
   string body = string.Empty;                  
   this._password = this.getPassword();
            
  body += "Dear " + this._firstName + " " + this._lastName + ",<br><br>";
  body += "<br><br>Thank you for registering...." +
  "your login information:<br><br>";
  body += "User Name: " + this._eMail +"<br>";
  body += "Password:  " + this._password;
  body += "<br><br>Please note that usernames and passwords are case sensitive.";
  body += "<br>Once Logged in you have the option of updating your login information.";
  body += "<br><br><br>Best Regards,<br><br><br>";

  try
 {
    MailMessage msg = new MailMessage();
    msg.To = this._eMail;
    msg.From = "kevin.hopkins@kevolutions.com";
    msg.Subject = "Login Information from Linear Motion Systems";
    msg.BodyFormat = MailFormat.Html;
    msg.Body = body;
    SmtpMail.SmtpServer = "127.0.0.1";
    SmtpMail.Send(msg);
  }
 catch (Exception e)
 {
   throw e;
 }
 }

Let me know if this is helpful

-K            
0
 
LVL 18

Accepted Solution

by:
tusharashah earned 250 total points
ID: 11855714
Your code seems perfect!

Are you catcing "Exception e" anywhere else?

or just try to write Exception on TextBox rather then throwing it.
0
 
LVL 18

Expert Comment

by:tusharashah
ID: 11919416
What was the error?
0
 

Author Comment

by:Khopkins32
ID: 11930450
Thanks tusharashah,
  Like you mentioned my code was correct, which lead me to believe that something wrong on the receiver end. After doing some investigating, it turned out to be that the hotmail account that I was sending my test emails were being drop in my junk email folder. This was done automatically after microsoft up it storage capacity and incorporated a new filtering system. (Basically everything sent to it is consider junk until you specify otherwise). Thanks for your help.

-K
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Web Reply Form - PHP with Upload 4 67
Gulp not seeing Changes 4 55
Accurate Analytics (Not Google) 2 40
Button to go back 3 25
Read about why website design really matters in today's demanding market.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
The viewer will learn how to dynamically set the form action using jQuery.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question