Important alert: (current site time 7/16/2013 6:50:19 AM EDT)
 

winzip icon

Multi-Part Alternative Mail - NOT A CFX! NOT ENCRYPTED!

Email
Submitted on: 4/23/2001 9:36:11 PM
By: Rabid Nerd Productions  
Level: Intermediate
User Rating: By 3 Users
Compatibility: Cold Fusion 4.5
Views: 14101
author picture
(About the author)
 
     CF_MPAMAIL - Non-Encrypted CF-source-ONLY workaround to send Multipart/Alternative Emails by Herbert L. Riede Key benefits:
- Can be used by those who cannot install CFX tags
- Teaches by example some basic Email Formatting Main audience:
- Email Advertisers Multipart/Alternative is the format that allows you to send text & HTML versions in one email, and the recipient's reader selects the appropriate version to display. If it is a very old non-compliant reader, the text appears first. Tested with AOL, HotMail, Yahoo, Everyone.net, OutLook 2000 (and Express). Remember with HTML mail - IMG SRC's should refer to an absolute, web-based URL. All links must be absolute. Javascript should never be used in HTML mail - many organizations block mail with script and others have mail programs that throw warnings/do not execute Javascript (Outlook 2000). Some web-based email readers block FORMs from HTML mail (Everyone.net). Always have your sending server set up with a Fully Qualified Domain Name (FQDN), as some companies, including AOL, block mail coming from unnamed servers (even though their servers accept the mail). This is also known as a "Reverse DNS Entry". Version 1.1 - Released April 19, 2002
- Improved compatibility across readers
- Added better Reply-To support
- Added "Errors-To" address support
- Added MAXROWS
- Added STARTROW
- Added PORT
- Added MAILERID
- If missing [[HTMLVER]] seperator, tries to detect email's state and sends as single-part email. If email contains then sends as TYPE="HTML", otherwise as Text. Version 1.0 - Released April 23, 2001
- Initial Release To install CF_MPAMAIL: Copy MPAMAIL.CFM to your CustomTags directory. This directory is typically C:\CFUSION\CustomTags\ where C:\ is the drive where you installed ColdFusion Server If you do not have access to this directory place the MPAMAIL.CFM file in every directory you wish to use it in.
 
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
//**************************************
// for :Multi-Part Alternative Mail - NOT A CFX! NOT ENCRYPTED!
//**************************************
//(c)2001-2002 Herb Riede, All Rights Reserved.
//Any modifications must be submitted for 
//inclusion. Appropriate credit will be
//given for improvements. Have fun..
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 4 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
7/18/2001 9:53:33 PMMax

I could not get this code to run correctly on my server it only sends a text-html message the server is coldfusion 4.5
(If this comment was disrespectful, please report it.)

 
7/19/2001 12:04:42 AMHerb Riede

I have emailed him/you seperately:

Change "multipart/alternative" to "multipart/mixed" for a combined email, as opposed to a one-best-version-my-reader-can-handle email..
(If this comment was disrespectful, please report it.)

 
12/14/2001 1:55:45 PMJacob Allred

do you have this saved in coldfusion files that you could send me? i'm a little confused as to what parts of your code above code in which files, but i run a few newsletters and this code would be VERY useful to me! thanks! (jacob@allredtech.com)
(If this comment was disrespectful, please report it.)

 
12/14/2001 2:14:08 PMHerb Riede (Author)

Please check Allaire's Developer's Exchange. I also posted it as a ZIP file there.
(If this comment was disrespectful, please report it.)

 
12/14/2001 3:31:56 PMJacob Allred

got it! thanks a ton!
(If this comment was disrespectful, please report it.)

 
4/19/2002 4:51:31 PMHerb Riede

UPDATED April 19, 2002 - Version 1.1
(If this comment was disrespectful, please report it.)

 
5/19/2002 6:36:15 PMZach

What kind of files are Cold Fusion files? I mean do they have to be compiled like .vbp files in Visual Basic or are they just ascii files with a specific extension, and if they are just ascii files then what is their extension? Also how do you tell your machine to call on these files? Any help you could give me would be greatly appreciated. Thanks.
(If this comment was disrespectful, please report it.)

 
5/15/2003 1:27:00 AMShengriken

CF files are '.cfm', '.cfx'. You must install
(If this comment was disrespectful, please report it.)

 
5/15/2003 1:42:00 AMShengriken

sorry. You must install Coldfusion Server in order to run the pages dynamically (meaning, the CF code wont execute when someone visits the page on your computer unless you have Coldfusion Server running). You also need IIS (Internet Information Services) running on your computer. This is provided on WinNT, Win2k, Win2kPro, WinXp, WinXP Pro, etc etc. It will be on the CD for the Operating System. Also, you can prolly download it from Microsoft. You can edit .Cfm and .cfx files and stuff with notepad, but i recommend Macromedia Coldfusion Studio 4.5
(If this comment was disrespectful, please report it.)

 
4/15/2004 12:45:22 PM

Hi,
I am using qmail as my outgoing mail server, when I use the CF_MPAMAIL tag the SMTP server sends back the following error mesesage:

Failed to send the spooled mail file, C:\CFusion\Mail\spool\123.cfmail.
SMTP server replied
(If this comment was disrespectful, please report it.)

 
4/15/2004 12:47:43 PM

(cont'd from above) "See http://pobox.com/~djb/docs/smtplf.html."
It sends CFMAIL OK, seems to be a problem with missing linefeeds with CF_MPAMAIL. Any suggestions are greatly appreciated.

(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.