Good afternoon code Gurus Can anyone provide a simple working example of sending email from this server using vb.net 4 Thanks, Blue
Please see this Knowledge Base article for sample code you are interested in: http://support.discountasp.net/KB/a364/how-to-send-email-in-aspnet-20.aspx
Thanks. I did read that first before posting but it seems to be all about ASP.NET 2.0. So are you saying that this should work fine in Asp.net4? Thanks
Yes, the code should still work in ASP.NET 4 We also have a knowledge base article that shows you how to use our mail servers SMTP service to send out messages from your web application. The knowledge base can be found here: http://support.discountasp.net/KB/a1060/how-to-send-email-in-aspnet-20-smtp-authentication.aspx Notice that you have to authenticate against the SMTP service on the mail server in order to send out the email message. You will need to authenticate with one of your email users that you have created on the mail server.
The email related namespaces have not changed and there are no new features. Its the same thing. By using a newer framework, you are getting additional features namespaces, performance improvements etc. But things like sending mail etc, wont be affected. This allows for migration upward while maintaining backward comparability. Well most the time
Inserting a link into the email Hi All, Thanks again to Dmitri for providing an excellent link for code to send email from the host server. This is working fine, but I want to insert a hyperlink into the body of the email and can not find a code example or make the object model work to insert a link into the body. Can anyone provide an example? Thanks Blue
Hi Blue, What's the exact problem you're having? The body of the text is a string variable so you should be able to store something like: <A HREF="http://www.mydomain.com">http://www.mydomain.com</A> If you're having trouble escaping characters, please see this link: http://msdn.microsoft.com/en-us/library/4edbef7e.aspx I'm not a VB expert, but I know in C#, you can escape an entire string by using the '@' symbol. For example: String Email.Body = @"<A HREF="http://www.mydomain.com">http://www.mydomain.com</A>"; I'm not sure if there is a functional equivalent in VB.