开发者

Send mail in asp.net without smtp details

开发者 https://www.devze.com 2022-12-31 16:07 出处:网络
I am using asp.net and C#. I have deployed my application on the server and now I come to know that my server would not provide me SMTP detail , is their any way I could send sms without smtp details

I am using asp.net and C#.

I have deployed my application on the server and now I come to know that my server would not provide me SMTP detail , is their any way I could send sms without smtp details.

I can use bot asp.net3.5 with C# or SQL Server 2005 to send mail.

Thanks in adv开发者_高级运维ance


To send an email with C# / .NET, make use of the System.Net.MailMessage and System.Net.SmtpClient classes.

Create a new instance of the MailMessage class, set some properties (from, to, body, subject, etc).

Create a new instance of the SmtpClient class, set some properties (SMTP credentials).

Then just do smtpClient.Send(mailMessage).

Pretty simple.


It is easy to send through SQL Server: http://msdn.microsoft.com/en-us/library/aa260697%28SQL.80%29.aspx If your administrators will allow it. It is debatable whether this is good practice, but I worked at one place that perfromed all of its automated emailing of error notifications for example, using xp_sendmail


Yes, your server absolutely has an IP address, you just don't know what it is. Here is some information on finding out what your IP address is..

No, you cannot send or receive any kind of email without the proper server/connection information. Otherwise, I could just send email from your account without you knowing it.

0

精彩评论

暂无评论...
验证码 换一张
取 消