Codefixer - ASP tutorials, resources and software
asp.netPRO “Best ASP.NET Host” – DiscountASP.NET
Home   Articles   Resources   ASP directory   ASP Tutorials   Code Snippets   ASP Applications   Forum
Wednesday 14 May
MembersPro PayPal - ASP Membership software

ASP.NET 3.5 Hosting – DiscountASP.NET


ASP Partner ASP Partner ASP Partner more partners...

Sending Email with the JMail Component

<%@ language= "VBscript" %>
<% Option Explicit
'declare your variables
Dim JMail
'create an instance of the JMail Object
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "mail.codefixer.com"  ' the name of your mailserver
JMail.AddRecipient "sendto@email.com"  ' the email it will be sent to
JMail.Sender = "sentfrom@Email.com" ' the email it will be sent from
JMail.Subject = "Your subject"
'JMail.ContentType = "text/html"
JMail.Body = "Hi just testing out this JMail component."
JMail.Execute
Set JMail= Nothing
%>

By default JMail will send the message in text format. To send the email in HTML format you will need to uncomment the line - JMail.ContentType = "text/html".
Just save your file as email.asp and run it on the server and it should work.





If you have any code snippets to share with full credit given then send an email to Codesnippets - You'll receive full credit and a link back to your site.

ASP.NET 3.5/2.0 Web Hosting: 3 Months FREE – Click Here!




About | Contact | Advertise | Feedback | Hire Us | Link

Site developed by Michael Wall - Web Design Belfast N.Ireland.
Copyright © 2000-2008. All rights reserved.

Do you intend to move to ASP.NET or have you already?
Yes will do
Have done
ASP does fine
Not a priority


Directory Software