Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 11th, 2004, 08:27 PM
Authorized User
 
Join Date: Jun 2003
Location: Melbourne, Victoria, Australia.
Posts: 90
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to tdaustin Send a message via Yahoo to tdaustin
Default Send Emails in ASP

Hi Everyone

As spam has been increasing and increasing so too have spam filters on client emails. I find that website emails are getting blocked more and more. Which is a real problem for password recovery and that sort of thing.

I currently use Persist ASPEmail component for my emailing needs

I was wonder how can i minimise this?

Do you have an example code that can authenticate these emails as close to a real email as possible. Or measure to pass the majority of spam filters criteria?

Thanks in advance

Tim

Here is a typical code i would use

Code:
' send email

BodyText = "Password Recovery" & VbCrLf & VbCrLf
BodyText = BodyText & "Dear " & objRS("ContactName") & ", "& VbCrLf
BodyText = BodyText & "You have requested your Username & Password to be sent to you via email.  Your details are as follows: " & VbCrLf & VbCrLf
BodyText = BodyText & "Username: " & objRS("Username") & VbCrLf
BodyText = BodyText & "Password: " & objRS("Password") & VbCrLf & VbCrLf
BodyText = BodyText & "Regards, "& VbCrLf & "Administration" & VbCrLf

set Mail = Server.CreateObject("Persits.MailSender")

        Mail.Host = Request.ServerVariables("LOCAL_ADDR")
        Mail.From = "info@company.com
        Mail.FromName = "My Company
        Mail.AddAddress objRS("C_Email")
        Mail.AddReplyTo "info@company.com
        Mail.Subject = "Password Recovery"
        Mail.Body = BodyText
        Mail.Send    
        set Mail = Nothing


TDA
__________________
TDA
 
Old August 11th, 2004, 08:41 PM
Authorized User
 
Join Date: Aug 2004
Location: Chicago, IL, USA.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm not aware of any changes in your code that would help you defeat spam filters, but one of the most important things you can do is to make sure that the domain you're sending your e-mails from is the same domain as that in the e-mail address your using.

Spam filters tend to be extremely critical of e-mails where the two don't match. If, for example you send e-mail from your server using your yahoo e-mail address, the spam filter will recogonize that the e-mail didn't actually come from yahoo and often toss it into the junkmail category.

There might possibly be some additional code in the header of your e-mails that might make it look more authentic, but it probably won't be much more effective then the code you're currently using.

Chris

 
Old August 12th, 2004, 09:02 AM
Friend of Wrox
 
Join Date: Aug 2003
Location: , , .
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I send emails all the time from ASP. The key is to keep your emails legit. Don't Spam. Make sure the domain you are sending from matches your sender, that the email is going to people who are expecting such emails and that your subjects and meassages don't include spam words.
 
Old August 12th, 2004, 05:13 PM
Authorized User
 
Join Date: Jun 2003
Location: Melbourne, Victoria, Australia.
Posts: 90
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to tdaustin Send a message via Yahoo to tdaustin
Default

Thanks everyone,

So would Request.ServerVariables("LOCAL_ADDR") affect the email becuause it would return the mail server ip and not the mail record? would i be better to code it to the mail record of each indivual domain? eg. Mail.Host = "mail.mycompany.com"

I guess at the end of the day we can only provide a service to the client and if they do run heavy spam filters they need to allow the websites they are interested in.

Thanks for your advice

Tim

TDA
 
Old August 12th, 2004, 07:09 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Keep the message short too, so that you are less likely to have the email bounce.

List of server variables and the values pulled back: http://www.4guysfromrolla.com/demos/servervariables.asp.

Brian




Similar Threads
Thread Thread Starter Forum Replies Last Post
send MASS Emails in ASP.NET 2 with VB.NET 2005 alexdcosta ASP.NET 2.0 Basics 1 July 17th, 2006 12:31 AM
Code to send emails maitias C# 2005 2 February 1st, 2006 01:09 PM
send emails to several users femig VBScript 4 April 15th, 2005 07:42 AM
Send two emails instead of one ss2003 Beginning PHP 3 January 28th, 2005 11:54 AM
Send Emails and Attachments. mistry_bhavin General .NET 2 August 11th, 2004 10:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.