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

sending email using SMTP in asp.net

P: n/a
using SMTP to send email.

is there any settings need to be configured apart from Host name and
Port, while sending emails using SMTPClient in .Net?
when i try to send mail to ids which has only one dot in the domain
name (eg : te**@abc.com) there are no issues.
but when the mail ids are like (te**@abc.co.in or te**@abc.rr.com) the
mail is not getting received by those ids.
also, there are no exceptions occured when i debugged it.

this is the code i have used:

MailMessage msg = new MailMessage(fromId, ToIds);
SmtpClient client = new SmtpClient();
client.Host = hostName;
client.Port = port;
client.Send(msg);

thanks,
shan
Sep 30 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
SMTP clients have rules who can forward through them. In general, your own
domain works, but anything other than that domain is refused. This is a
setting on the mail server, not in the ASP.NET application.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
<sh**********@gmail.comwrote in message
news:82**********************************@l76g2000 hse.googlegroups.com...
using SMTP to send email.

is there any settings need to be configured apart from Host name and
Port, while sending emails using SMTPClient in .Net?
when i try to send mail to ids which has only one dot in the domain
name (eg : te**@abc.com) there are no issues.
but when the mail ids are like (te**@abc.co.in or te**@abc.rr.com) the
mail is not getting received by those ids.
also, there are no exceptions occured when i debugged it.

this is the code i have used:

MailMessage msg = new MailMessage(fromId, ToIds);
SmtpClient client = new SmtpClient();
client.Host = hostName;
client.Port = port;
client.Send(msg);

thanks,
shan
Sep 30 '08 #2

P: n/a
An email address is an email address and it really shouldn't matter at all.
Since 'ToIds' is a variable, what format is the variable in (assuming
multiple email addresses)?

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
<sh**********@gmail.comwrote in message
news:82**********************************@l76g2000 hse.googlegroups.com...
using SMTP to send email.

is there any settings need to be configured apart from Host name and
Port, while sending emails using SMTPClient in .Net?
when i try to send mail to ids which has only one dot in the domain
name (eg : te**@abc.com) there are no issues.
but when the mail ids are like (te**@abc.co.in or te**@abc.rr.com) the
mail is not getting received by those ids.
also, there are no exceptions occured when i debugged it.

this is the code i have used:

MailMessage msg = new MailMessage(fromId, ToIds);
SmtpClient client = new SmtpClient();
client.Host = hostName;
client.Port = port;
client.Send(msg);

thanks,
shan

Sep 30 '08 #3

P: n/a
It only matters to the email server, which by default should block addresses
outside of the domain.

Years ago, this was not true, and people would find a UNIX/Linux server with
SendMail in default install. You could then send email through that server
and it was very hard to trace it back to the originator. Today, the normal
default is "only from my domain".

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
"David Wier" <dw@dw.comwrote in message
news:e6**************@TK2MSFTNGP04.phx.gbl...
An email address is an email address and it really shouldn't matter at
all.
Since 'ToIds' is a variable, what format is the variable in (assuming
multiple email addresses)?

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with
no bloated markup
<sh**********@gmail.comwrote in message
news:82**********************************@l76g2000 hse.googlegroups.com...
>using SMTP to send email.

is there any settings need to be configured apart from Host name and
Port, while sending emails using SMTPClient in .Net?
when i try to send mail to ids which has only one dot in the domain
name (eg : te**@abc.com) there are no issues.
but when the mail ids are like (te**@abc.co.in or te**@abc.rr.com) the
mail is not getting received by those ids.
also, there are no exceptions occured when i debugged it.

this is the code i have used:

MailMessage msg = new MailMessage(fromId, ToIds);
SmtpClient client = new SmtpClient();
client.Host = hostName;
client.Port = port;
client.Send(msg);

thanks,
shan

Sep 30 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.