![]() |
|
|
|||||||
![]() |
ASP Net - how to send custom e-mail with asp.net |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
I am trying to send a custom e-mail using asp.net but am having trouble. The
code that I found to do this is: <% Dim msgMail as New MailMessage msgMail.From = "" msgMail.To = "" msgMail.Subject = "Happy Birthday" msgMail.Body = "If your birthday is today, have a good one." SmtpMail.SmtpServer = "smtpout.secureserver.net" SmtpMail.Send(msgMail) %> But when I load this page, I get the following error message: "Type 'MailMessage' is not defined" Can someone help me out with this? =?Utf-8?B?QnJhbmRvbg==?= |
|
|
|
|
#2 |
|
Posts: n/a
|
Either you forgot to import System.Web.Mail "Imports System.Web.Mail" or
you miss-spelt the class name "Brandon" <> wrote in message news:970F8B7F-5907-404B-8413-... >I am trying to send a custom e-mail using asp.net but am having trouble. >The > code that I found to do this is: > > <% > Dim msgMail as New MailMessage > msgMail.From = "" > msgMail.To = "" > msgMail.Subject = "Happy Birthday" > msgMail.Body = "If your birthday is today, have a good one." > SmtpMail.SmtpServer = "smtpout.secureserver.net" > SmtpMail.Send(msgMail) > %> > > But when I load this page, I get the following error message: > > "Type 'MailMessage' is not defined" > > Can someone help me out with this? Niko |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Asp.Net Custom Controls & Safari Compatibility | Osiris | General Help Related Topics | 0 | 06-01-2009 08:03 PM |
| ASP.NET: Asign Users in Roles(Array.IndexOf(Of String) method) | msandlana | Software | 0 | 04-25-2008 06:37 AM |
| asp.net : custom code to delete data from Grid view (Database) | sara_23apr | Software | 1 | 06-19-2007 01:08 PM |
| send and receive SMS with asp.net | dev2000 | Software | 0 | 10-22-2006 07:25 AM |
| This is incredible! | jc_ice | DVD Video | 1 | 08-13-2006 10:47 AM |