Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Server Side Programming > ASP and ASP.NET
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 08-18-2009, 12:18 AM
  #1
ameilius
Novice (Level 1)
 
Join Date: Aug 2009
Posts: 1
iTrader: (0)
ameilius is an unknown quantity at this point
ASP File Attachment Mailer.....

i need some suggestions.... ive done my reading... learning asp as i go - i got a piece of code that works with me editing manually what i want it to send and where i want it to send....

ok ok ok - im rambling...

heres what i need to accomplish....

i made a ton of .htm files in a /folder - i made an html page with 1 text input field for an email to send the files to - what i want to do is select with radio buttons or check boxes which .htm i want to send to the email address entered - and POSSIBLY have the subject line state which file im sending

ie.

i want to select "1.htm" and "2.htm" and send them to "email@email.com"

im always going to be sending from 1 specific constant email so that can be static... heres what i have so far that can send what i want to who i want - but i want to be able to select multiple files to display as html in their OWN email if possible --- PLEASE ASSIST IF POSSIBLE

Code:
<%
Set myMail=CreateObject("THIS IS THE SUBJECT LINE")
myMail.Subject="THIS IS THE SUBJECT LINE"
myMail.From="EMAIL@EMAIL.COM"
myMail.To="RANDOM@EMAIL.COM"
myMail.CreateMHTMLBody "file://C:/FOLDER/1.mht"
myMail.AddAttachment "file://C:/FOLDER/1.pdf"
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver")="SMTP.EMAIL.COM"
'Server port
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing
%>
like i said - this works manually... but id like to be able to select which files from an .html page with the check boxes or radio buttons to send to whatever email address i designate....
ameilius is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 08-31-2009, 02:53 PM
  #2
afterburn
Can't say much here
 
afterburn's Avatar
 
Join Date: May 2004
Posts: 2,850
iTrader: (0)
afterburn will become famous soon enough
CreateObject("THIS IS THE SUBJECT LINE")

this part is incorrect. You need to specify the CDO object should be

Server.CreateObject("CDO.Message") 'Note the "Server" part creates the object inprocess vs out
__________________
ASP.net nice bits
Code Smith rocking tool for Code Generation in any language (Written in .net)
Red Gate SQL tools for DBA
Blog Personal blog
.afterburn
afterburn is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart



 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 02:07 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.