Pictures in asp generated e-mails

Discussion in 'ASP General' started by Randy Rahbar, Sep 19, 2003.

  1. Randy Rahbar

    Randy Rahbar Guest

    > txtMailBody = txtMailBody & "<center><img src='CommAd.jpg'>"

    You need to put your domain in the img src.... once it's on the client's
    computer, it thinks it's a local image - and therefore not working.

    RR
     
    Randy Rahbar, Sep 19, 2003
    #1
    1. Advertising

  2. Randy Rahbar

    Randy Rahbar Guest

    > Please note that I could have used:
    > txtMailBody = txtMailBody & "<center><img
    > src='http://mydomain.com/pics/CommAd.jpg'>"
    > I tried it and it worked fine... but I don't want this method. All I want

    is
    > to simply let the picture shows without "hosting" it somewhere on the

    web!!!

    I just read this part of your original post - so forget what I just posted.
     
    Randy Rahbar, Sep 19, 2003
    #2
    1. Advertising

  3. Randy Rahbar

    Ice Man Guest

    hi again,


    now I want to send a picture in my e-mails that are send using asp code

    first I create the mail Object: Set objMail =
    Server.CreateObject("CDONTS.NewMail")

    After I fill a variable with the html code that will be the mail

    txtMailBody = "<html>"
    txtMailBody = txtMailBody & "<center>Hi <BR> This is a test"

    txtMailBody = txtMailBody & "<center><img src='CommAd.jpg'>"

    finally I send the mail using the following code:
    objMail.Body = txtMailBody
    objMail.Send

    ----------------------------------------------------------------

    The problem is that the picture does not show on the users screens
    should I send the picutre as attachement to?? if yes how could this be
    done..?

    or is there is specific code to use???

    Please note that I could have used:
    txtMailBody = txtMailBody & "<center><img
    src='http://mydomain.com/pics/CommAd.jpg'>"
    I tried it and it worked fine... but I don't want this method. All I want is
    to simply let the picture shows without "hosting" it somewhere on the web!!!

    thanks
     
    Ice Man, Sep 19, 2003
    #3
    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. Duy Nguyen

    send mails from asp.net pages

    Duy Nguyen, Aug 9, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    454
    Duy Nguyen
    Aug 11, 2003
  2. michi
    Replies:
    1
    Views:
    3,623
    Hermit Dave
    Jan 29, 2004
  3. Ammar

    Norton blocks ASP.NET mails!

    Ammar, Jul 6, 2004, in forum: ASP .Net
    Replies:
    10
    Views:
    1,083
    dotnetasp
    Feb 13, 2006
  4. =?Utf-8?B?TWF4?=

    Help to send mails with delay in asp.net c#.

    =?Utf-8?B?TWF4?=, Jan 7, 2005, in forum: ASP .Net
    Replies:
    10
    Views:
    1,868
    Lau Lei Cheong
    Jan 7, 2005
  5. Martin Raychev
    Replies:
    1
    Views:
    294
    Alvin Bruney [MVP]
    Mar 2, 2004
Loading...

Share This Page