By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,222 Members | 1,728 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,222 IT Pros & Developers. It's quick & easy.

Sending Email

P: n/a
Ant
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send
mail, however it's not sending any emails.

I'm using it on a Windows 2003 server.

The simplest way to use this is
smtpMail.Send("fr**@here.com", to@there.com, "Message subject", "Message
Body")

I'm sending it to my own email address on a different server using a dummy
'from' email.

Does anybody have any experience with this. It sems simple enough...
Much thanks in advance
Ant
Nov 29 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi,

Did you set the SMTP server properly? And does that server allow
relaying for your other address?

Also, when you mean it is not sending emails, do you mean it throws an
exception, or it executes ok, but no email is sent?

-Lenard


Ant wrote:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send
mail, however it's not sending any emails.

I'm using it on a Windows 2003 server.

The simplest way to use this is
smtpMail.Send("fr**@here.com", to@there.com, "Message subject", "Message
Body")

I'm sending it to my own email address on a different server using a dummy
'from' email.

Does anybody have any experience with this. It sems simple enough...
Much thanks in advance
Ant

Nov 29 '05 #2

P: n/a
Ant
Hi Lenard,
No exceptions occur, just nothing comes into my email box. I now suspect
that it is being filtered by the corporate spam filter as I tried sending
another message via a 'real' email service & again I got nothing.

I am interested in your question:
Did you set the SMTP server properly? And does that server allow
relaying for your other address?
I didn't set this dev box up so are you suggesting that the server may be
incapable of sending emails? If so, are the settings in smpt IIS?

Thanks for your help
Ant
"Lenard Gunda" wrote:
Hi,

Did you set the SMTP server properly? And does that server allow
relaying for your other address?

Also, when you mean it is not sending emails, do you mean it throws an
exception, or it executes ok, but no email is sent?

-Lenard


Ant wrote:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send
mail, however it's not sending any emails.

I'm using it on a Windows 2003 server.

The simplest way to use this is
smtpMail.Send("fr**@here.com", to@there.com, "Message subject", "Message
Body")

I'm sending it to my own email address on a different server using a dummy
'from' email.

Does anybody have any experience with this. It sems simple enough...
Much thanks in advance
Ant

Nov 29 '05 #3

P: n/a
Hi,

I meant did you use SmtpMail.SmtpServer to specify which SMTP server you
want to use for mailing?

And the other question was directed at, if you know that this server
will let you relay mail for other addresses? Corporate email servers
often deny relaying, so you would not be able to use any address in the
to/from fields.

For testing applications that mail something I found the best way to be
installing the IIS SMTP server component locally (it is present in XP
and Server versions of Windows). Then you can allow yourself all rights
(localhost), and you can set it to send your mails directly (no
smarthost). This way (theoretically) no spam filter will catch it (at
least on the inside) and it will relay wherever you want to relay.

-Lenard

Ant wrote:
Hi Lenard,
No exceptions occur, just nothing comes into my email box. I now suspect
that it is being filtered by the corporate spam filter as I tried sending
another message via a 'real' email service & again I got nothing.

I am interested in your question:

Did you set the SMTP server properly? And does that server allow
relaying for your other address?

I didn't set this dev box up so are you suggesting that the server may be
incapable of sending emails? If so, are the settings in smpt IIS?

Thanks for your help
Ant
"Lenard Gunda" wrote:

Hi,

Did you set the SMTP server properly? And does that server allow
relaying for your other address?

Also, when you mean it is not sending emails, do you mean it throws an
exception, or it executes ok, but no email is sent?

-Lenard


Ant wrote:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send
mail, however it's not sending any emails.

I'm using it on a Windows 2003 server.

The simplest way to use this is
smtpMail.Send("fr**@here.com", to@there.com, "Message subject", "Message
Body")

I'm sending it to my own email address on a different server using a dummy
'from' email.

Does anybody have any experience with this. It sems simple enough...
Much thanks in advance
Ant

Nov 29 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.