Results 1 to 2 of 2
Thread: ASP Mail function
-
ASP Mail function
3 Feb 2011 @ 15.19 Hi there,
Does anyone know if ASP has a mail() function like PHP does? I need to send non authenticated mail through ASP as the mail server is on a different server to the site, and the authentication method that's being used at the moment is rejecting any mail being sent because the code is on a different server to the mail accounts (much like PHP's PEAR mail feature does).
Thanks!
Stu
-
28 Sep 2011 @ 07.02 [FONT=Courier New][SIZE=2]<%@ Import Namespace="System.Web.Mail"%>
<%
[FONT=Courier New]Dim[/FONT] objMail [FONT=Courier New]As[/FONT] [FONT=Courier New]New[/FONT] System.Web.Mail.MailMessage()
objMail.From = "recipient_address1@domain.com"
objMail.To = "recipient_address2@domain.com"
objMail.Subject = "The Subject Line"
objMail.BodyFormat = MailFormat.Html 'MailFormat.Text to send plain text email
objMail.Priority = MailPriority.High
objMail.Body = "********************<BR>" & _
"Thank you for visiting my website" & _
"********************<BR>"
System.Web.Mail.SmtpMail.SmtpServer = "mail.yoursmtpserver.com"
System.Web.Mail.SmtpMail.Send(objMail)
objMail = [FONT=Courier New]Nothing[/FONT]
%>[/SIZE][/FONT]Last edited by WelshStew; 5 Oct 2011 at @ 07.51. Reason: remove forced signature
Similar Threads
-
mail server questions
By silversurfer5150 in forum PHP, ASP & JavaReplies: 4Last Post: 25 Feb 2011, @ 22.05 -
E-mail signatures
By Gaz in forum HTML & CSSReplies: 7Last Post: 19 Mar 2009, @ 04.08 -
js function help?
By ljackson in forum Javascript LibrariesReplies: 15Last Post: 11 Mar 2009, @ 09.31 -
PHP Copy() function
By stu2000 in forum PHP, ASP & JavaReplies: 3Last Post: 20 Jan 2009, @ 19.52



LinkBack URL
About LinkBacks












Displaying Search Results
Agree with you.... Generally, we don't have control over display...