Solved

Setting up Windows XP Professional to Send email

Posted on 2004-08-14
7
225 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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

706 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now