Email with attach file please

Discussion in 'ASP General' started by beny, May 2, 2007.

  1. beny

    beny Guest

    See the ASP code below in order to send an email. How can I attach
    a file to this email please?

    set objMailer = Server.CreateObject("CDONTS.Newmail")
    objMailer.From = ""
    objMailer.To = ""
    objMailer.Subject = "a Subject"
    objMailer.Body = “I need to know ASPâ€

    on error resume next
    objMailer.Send
    if err then
    response.Write err.Description
    else
    'do nothing it went okay
    end if

    Thanks a lot

    Beny
     
    beny, May 2, 2007
    #1
    1. Advertising

  2. beny

    Mike Brind Guest

    "beny" <> wrote in message
    news:...
    > See the ASP code below in order to send an email. How can I attach
    > a file to this email please?
    >
    > set objMailer = Server.CreateObject("CDONTS.Newmail")
    > objMailer.From = ""
    > objMailer.To = ""
    > objMailer.Subject = "a Subject"
    > objMailer.Body = "I need to know ASP"
    >
    > on error resume next
    > objMailer.Send
    > if err then
    > response.Write err.Description
    > else
    > 'do nothing it went okay
    > end if
    >
    > Thanks a lot
    >
    > Beny
    >


    Get rid of it if you are on Windows 2000 or better and use CDO

    http://www.w3schools.com/asp/asp_send_email.asp

    --
    Mike Brind
     
    Mike Brind, May 3, 2007
    #2
    1. Advertising

  3. beny

    beny Guest

    thanks Mike,

    i will try it, but please what should i do now?

    thanks

    beny

    "Mike Brind" wrote:

    >
    > "beny" <> wrote in message
    > news:...
    > > See the ASP code below in order to send an email. How can I attach
    > > a file to this email please?
    > >
    > > set objMailer = Server.CreateObject("CDONTS.Newmail")
    > > objMailer.From = ""
    > > objMailer.To = ""
    > > objMailer.Subject = "a Subject"
    > > objMailer.Body = "I need to know ASP"
    > >
    > > on error resume next
    > > objMailer.Send
    > > if err then
    > > response.Write err.Description
    > > else
    > > 'do nothing it went okay
    > > end if
    > >
    > > Thanks a lot
    > >
    > > Beny
    > >

    >
    > Get rid of it if you are on Windows 2000 or better and use CDO
    >
    > http://www.w3schools.com/asp/asp_send_email.asp
    >
    > --
    > Mike Brind
    >
    >
    >
     
    beny, May 3, 2007
    #3
  4. beny

    beny Guest

    Thanks Mike

    Thanks Mike,

    You were right. It does perfectly work

    Have a good day

    Beny

    "Mike Brind" wrote:

    >
    > "beny" <> wrote in message
    > news:...
    > > See the ASP code below in order to send an email. How can I attach
    > > a file to this email please?
    > >
    > > set objMailer = Server.CreateObject("CDONTS.Newmail")
    > > objMailer.From = ""
    > > objMailer.To = ""
    > > objMailer.Subject = "a Subject"
    > > objMailer.Body = "I need to know ASP"
    > >
    > > on error resume next
    > > objMailer.Send
    > > if err then
    > > response.Write err.Description
    > > else
    > > 'do nothing it went okay
    > > end if
    > >
    > > Thanks a lot
    > >
    > > Beny
    > >

    >
    > Get rid of it if you are on Windows 2000 or better and use CDO
    >
    > http://www.w3schools.com/asp/asp_send_email.asp
    >
    > --
    > Mike Brind
    >
    >
    >
     
    beny, May 3, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2liQW5kZWxh?=

    <INPUT type="file" runat="server" - attach to email

    =?Utf-8?B?U2liQW5kZWxh?=, Jul 31, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    851
    Lau Lei Cheong
    Aug 2, 2004
  2. Replies:
    4
    Views:
    3,444
  3. a
    Replies:
    6
    Views:
    486
  4. Replies:
    0
    Views:
    691
  5. Warren Tang
    Replies:
    1
    Views:
    576
    Warren Tang
    Sep 17, 2008
Loading...

Share This Page