Hi
I want to attach html file to my email page.
The problem is that i got an error:
'Attachments' is not a member of 'Mail'
The error is in the line:
mail.Attachments.Add(attachment)
Why is that?
Thank's.
'In order to specify a different SMTP mail server to use to send the message, 'set the SmtpServer property: '************************************* 'SmtpMail.SmtpServer = emailServerName '************************************* 'Be careful, though. Since this is a static property, 'changing this value in one ASP.NET Web page will affect 'all ASP.NET Web pages using sending emails via the SmtpMail object. 'That is, if in one ASP.NET Web page you set the SmtpServer 'property to myMailServer, and then, in another ASP.NET Web page, 'do not specify the SmtpServer property, intending to use 'the default SMTP server, myMailServer will be used instead. 'For that reason, you should probably always specify 'the SmtpServer property - if you want to use 'the default SMTP server, simply do: '*********************** SmtpMail.SmtpServer = "127.0.0.1"
'Now, to send the message, use the Send method of the SmtpMail class SmtpMail.Send(mail)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.