268 users online (0 members and 268 guests)  

  Results 1 to 2 of 2


  1. Sending forms VIA email??? HelP?    Forum: HTML Forum
    Replies: 2
  2. Replies: 5
  1. #1
    itzik's Avatar
    New User

    Join Date
    Jun 2004

    help with sending email

    i created ASPMail object to send a email from my website i am trying to add the option of sending the email with an attachment and it's not working

    the website isn't on my computer

    when i give the method the path of the file on my computer it sends me an empty email but if i give a file that is where the web site is it sends me the file

    this is the code:

    Set Mailer = Server.CreateObject ("SMTPsvg.Mailer")
    Mailer.FromName = Request.Form("name")
    Mailer.FromAddress = Request.Form("email")
    Mailer.Subject = "Mail from aspmail form"
    Mailer.BodyText = Request.Form("att")
    Mailer.RemoteHost = "my smtp address"
    Mailer.AddRecipient "name", "email address"
    Mailer.AddAttachment("Resume.doc") - this works
    Mailer.AddAttachment("Resume.doc") - dosn't work

    if Mailer.SendMail then
    ' Message sent sucessfully
    response.write (" the mesg was sent. ")
    ' Message send failure
    response.write ("the msg wasn't sent. ")
    end if
    Set Mailer = Nothing

    thank's for the help

  2. #2
    QuietDean's Avatar

    Join Date
    Oct 2000
    Bournemouth, UK

    In the aspMail documentation, it explicitely explains that sending an attachment from the client computer is a major security risk, and cannot be done with aspMail.

    What you can do is include an upload first, and THEN send it via email.

    You see, if you tell the script to look for a file on your pc, it cannot get it becuase its on a different computer.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

Tags for this Thread