Email from web page

Results 1 to 7 of 7

Thread: Email from web page

  1. #1
    Clive Guest

    Default Email from web page

    I am successfully using ASPmail and my ISP&#039s smtp service to send an email form the web page to an email address that the user specifies, together with an attached file. This works fine, but actually I would prefer to have the text file contents placed into the Body, not sent as as an attachment. How can I do this?<BR>I have scoured the net to try to find the correct construction for this, but to no avail!<BR><BR>Thanks for any help!<BR>Clive

  2. #2
    Mark Vick Guest

    Default RE: Email from web page

    I also use ASPMail - what are you trying to attach, actually, that you now what in the body?<BR><BR>I am using it rudimentary-ily (ouch - that hurts when you make new words up like that!) but have wanted to rewrite it so that I could more easily control the body of the email.<BR><BR>Right now, I have a ton of <BR>Abody = "this and this"<BR>Abody = Abody & " plus this and this"<BR>and then finally a<BR>MyMail.Body = ABody<BR>I would like to move it into a database, so I could say "give me the body for the third message," but just too lazy to do - other more important things to do!<BR><BR>But, maybe I can help you out a bit - what exactly are you trying to do?

  3. #3
    Clive Guest

    Default RE: Email from web page

    Mark,<BR>Thanks for your comments!<BR>I want to allow the web page user to be able to enter their email address and click a button to send some information (from a separate text file on the server)to themselves. In return for the information, their email is logged into a database. <BR>I understand how to attach a text file to an email, but it ought to be possible to make the body of the message equal to the contents of the text file...<BR>I believe there are a number of email systems (especially free ones) that will not accept attachments, hence the need to put the key information in the body. <BR>I hope that&#039s clear!<BR>Thanks<BR>Clive

  4. #4
    RichardL Guest

    Default RE: Email from web page

    Clive,<BR>I am also building a site where the user can refer the site to a friend by entering the email into a field. I cannot use the CDO component NewMail as the server does not have this, or support it as it is running MS exchange server. Is there another way of doing this? <BR>I&#039ve tried Mailto but I can&#039t get the field name where the email address is typed to be the destination of &#039Mailto:...&#039 <BR>Can I use the exchange server component?<BR>I can&#039t use third party component ie.ASPMail as the University won&#039t install this onto the server.

  5. #5
    Jan-Loek Guest

    Default RE: Email from web page

    You could of course use the FileSystemObject to read the text file and then put it in the body of the e-mail.<BR><BR>-- <BR>Jan-Loek<BR>

  6. #6
    JHodges Guest

    Default RE: Email from web page

    Use this method with CDONTS as for ASPMail you should be able to do the same thing by modifing the htlm portion of the ASPMail script: <BR><BR>CDONTS CODE SAMPLE:<BR>(&#060;%<BR>Dim myMail <BR>Set myMail = CreateObject("CDONTS.NewMail") <BR> <BR>HTML = "&#060;!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN""&#062;" & NL <BR>HTML = HTML & "&#060;html&#062;" <BR>HTML = HTML & "&#060;head&#062;" <BR>HTML = HTML & "&#060;meta http-equiv=""Content-Type""" <BR>HTML = HTML & "HTML = HTML & ""content=""text/html; charset=iso-8859-1""&#062;""" <BR>HTML = HTML & "&#060;title&#062;Sample NewMail&#060;/title&#062;" <BR>HTML = HTML & "&#060;/head&#062;" <BR>HTML = HTML & "&#060;body&#062;" <BR>HTML = HTML & "This is a sample message being sent using HTML. <BR>&#060;/body&#062;" <BR>HTML = HTML & "&#060;/html&#062;" <BR> <BR>myMail.From = "" <BR>myMail.To = "" <BR>myMail.Subject = "Sample Message" <BR>myMail.BodyFormat = 0 <BR>myMail.MailFormat = 0 <BR>myMail.Body = HTML <BR>myMail.Send <BR>Set myMail = Nothing <BR>%&#062;)

  7. #7
    Join Date
    Dec 1969

    Default RE: Email from web page

    I agree... Just read it all in at once.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts