sending email using SMTP in asp.net

S

shansivamani

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 : (e-mail address removed)) there are no issues.
but when the mail ids are like ([email protected] or (e-mail address removed)) 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
 
C

Cowboy \(Gregory A. Beamer\)

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.
 
D

David Wier

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
 
C

Cowboy \(Gregory A. Beamer\)

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".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top