How should a user send mail from their website to me in asp.net 2.0

On my website, I want to provide a link through which a user can send emails to me.

+2


source to share


3 answers


Simple MailTo

<a href="mailto:astark1@unl.edu">mail me</a>

      

MailTo with multiple recipients

<a href="mailto:astark1@unl.edu,ASTARK1@UNL.EDU">mail me</a>

      

MailTo with theme

<a href="mailto:astark1@unl.edu?subject=Comments from MailTo Syntax Page">mail me</a>

      

MailTo with copy

<a href="mailto:astark1@unl.edu?cc=ASTARK1@UNL.EDU">mail me</a>

      

MailTo with blind copy

<a href="mailto:astark1@unl.edu?bcc=ASTARK1@UNL.EDU">mail me</a>

      



MailTo with message already running in the body

<a href="mailto:astark1@unl.edu?body=I am having trouble finding information on ">mail me</a>

      

MailTo with multi-line message in body

<a href="mailto:astark1@unl.edu?body=The message first paragraph.%0A%0aSecond paragraph.%0A%0AThird Paragraph.">mail me</a>
NOTE: Use "%0A" for a new line, use "%0A%0A" for a new line preceded by a blank line.

      

Features can be used in combination

MailTo with Subject, Recipient, Cc and Blind Cc

<a href="mailto:astark1@unl.edu?subject=MailTo Comments&cc=ASTARK1@UNL.EDU&bcc=id@internet.node">mail me</a>

      

It is recommended that you use a process other than MailTo the email process from your website.

If you are using MailTo, please encode the included email addresses to reduce spam for that address.

Source

+4


source


<a href="mailto:dnyaneshwar@example.com">Mail me</a>

      

When a user clicks on the link link that will appear on your website, a default email will open with the email address in the "To" field.



This has nothing to do with ASP.net 2.0 - it will work on any web page in any web browser, no matter how the web page is created.

+4


source


If you don't want to show your email address to spammers, I would recommend creating a contact form (using a CAPTCHA) and using the System.Net.Mail.MailMessage

and classes System.Net.Mail.SmtpClient

.

+3


source







All Articles