473,407 Members | 2,598 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,407 software developers and data experts.

SMTP Email problems

Hi,

I am using ASP.NET SmtpMail to send email using the following code

public void SendEmail(string From, string To, string Subject, StringBuilder
Message, string Attachment, string mailFormat)
{
MailMessage mailMessage = new MailMessage ();
mailMessage.From = From;
mailMessage.To = To;
mailMessage.Subject = Subject;
mailMessage.Body = Message.ToString ();

if(mailFormat == "T")
{
mailMessage.BodyFormat = MailFormat.Text;
}
else if(mailFormat == "H")
{
mailMessage.BodyFormat = MailFormat.Html;
}

SmtpMail.SmtpServer = "10.0.0.1";
SmtpMail.Send (mailMessage);
}

This code executes fine without error. But the email goes and sits in the
"C:\Inetpub\mailroot\Queue" folder.
SMTP service is running and cdosys.dll and cdonts.dll are installed.

My computer is connected to the internet through a Speedtouch 545 ADSL
router. I got the "10.0.0.1" by doing the ipconfig at command prompt.

Can anyone please guide me in the right direction.

Thanks,

Srinivas


Nov 19 '05 #1
1 1538
Srinivas,

If you are running Windows check the Internet Services Manager and make sure
your "Default SMTP Virtual Server" is running. Where are you getting your
email from? If you are connecting to an ISP's mail server rather than
running your own mail server then you'll need to configure the SMTP service
properties to forward to the mail server you usually connect to with the
mail client and authenticate with your user and password. Also, make sure
your SMTP service doesn't allow relaying by anyone other than your address
if you have a static IP address.

Do you have a static IP address? How are you connecting to the internet? If
you send email from your own server rather than connecting via a client,
i.e. outlook, to your ISP's mail server the mail shows as coming from your
IP address. In order to prevent spammers from opening an account running
spamware from a dynamically assigned IP address some ISPs won't relay your
mail this way and some other ISPs will reject email sent from a dynamic IP
address. So, test by sending to yourself first before dealing with the other
possible complications.

That's just a quick reply based on what I think is the likely situation.

"Srinivas" <no*****@email.com> wrote in message
news:ub**************@tk2msftngp13.phx.gbl...
Hi,

I am using ASP.NET SmtpMail to send email using the following code

public void SendEmail(string From, string To, string Subject, StringBuilder Message, string Attachment, string mailFormat)
{
MailMessage mailMessage = new MailMessage ();
mailMessage.From = From;
mailMessage.To = To;
mailMessage.Subject = Subject;
mailMessage.Body = Message.ToString ();

if(mailFormat == "T")
{
mailMessage.BodyFormat = MailFormat.Text;
}
else if(mailFormat == "H")
{
mailMessage.BodyFormat = MailFormat.Html;
}

SmtpMail.SmtpServer = "10.0.0.1";
SmtpMail.Send (mailMessage);
}

This code executes fine without error. But the email goes and sits in the
"C:\Inetpub\mailroot\Queue" folder.
SMTP service is running and cdosys.dll and cdonts.dll are installed.

My computer is connected to the internet through a Speedtouch 545 ADSL
router. I got the "10.0.0.1" by doing the ipconfig at command prompt.

Can anyone please guide me in the right direction.

Thanks,

Srinivas

Nov 19 '05 #2

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

Similar topics

2
by: RandRace | last post by:
I'm having some problems with a little script i wrote using net::smtp. I originally wrote it in linux where it works perfectly. I tried to use it from windows the other day and it doesn't work. It...
2
by: David | last post by:
Hi Group, I'm having a few problems with getting an SMTP server configured on my Windows 2000 Server web server. My web server is co-located at my hosts and i use VNC to remotely access the web...
3
by: RN | last post by:
I am tired of sending mail from the built-in SMTP service for so many reasons (errors are nondescriptive in the event log, it doesn't let me control which IP address it sends from, and it...
1
by: madfisher | last post by:
Hi, I am trying to send email via a ASP .NET page using the local SMTP virtual server. My mail items go in the Queue but do not get sent out. Can this be done this way, or do I need a true email...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
2
by: oliu321 | last post by:
Hi, First I am not trying to write a client to talk with hotmail straightly. I am trying to write some codes to send emails through a SMTP server. I wrote a C++ version using pure socket...
9
by: Ted Boyd | last post by:
I have an ASP page that sends email using CDOSYS. If there is any type of failure that causes the email not to be sent, I don't have any way of knowing it. Is there any email component that will...
8
by: Marty | last post by:
I'm having issues sending an email to an "@page.nextel.com" email address. I can send to any other email address fine, but when I try the page.nextel.com it gives me this error: ...
4
by: Brian | last post by:
Hello all, we don't actually host our own server but still should work the same. Here is the error message i get "error mailbox unavailable. The server response was: must be authenticated code...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.