Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

can't send email

can't send email

can't send email


I've got an application in which I'm trying to send email and it won't let me for some reason. Here is my code:


MailMessage message = new MailMessage(sentFrom, sendTo, subject, body);
SmtpClient client = new SmtpClient(smtpServer);
catch (Exception ex)

The problem is that this code works on my local machine when I use my smtp server but when I put it on someone else's machine, it doesn't work. I get various error messages depending on smptServer and on the delivery method.

For example, if I have no delivery method, and I run this on my local machine but using the other person's smtp server, then I get the message:

"Service not available, closing transmission channel. The server response was: 4.3.2 Service not available, closing transmission channel"

If I include the line client.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis right before I send, I get:

"Cannot get IIS pickup directory."

If I replace that line with SmtpDeliveryMethod.SpecifiedPickupDirectory, I get:

"Only absolute directories are allowed for pickup directory."

If I replace that line with SmtpDeliveryMethod.Network, I get the "service not available" message again.

This is all if I run it on my local machine using the other person's smtp server. I haven't been able to test it on their machine with anything other than my own smtp server, but I know that none of the delivery methods work on their machine either. I have yet to try it on their machine with their smtp server with or without delivery methods (this will have to wait until they get back after the weekend).

Can anyone see the problem? Do you think it's just a matter of using their smtp server on their machine (without a delivery method)?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close