Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 29th, 2004, 06:47 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default Image with mail

I am sending an HTML mail and in mail there is a logo of the company as wel the code is given below

strHTML = "<html>"& chr(13) & chr(10)
    strHTML = strHTML & "<head>" & chr(13) & chr(10)

    strHTML = strHTML & "</head>" & chr(13) & chr(10)
    strHTML = strHTML & "<body>" & chr(13) & chr(10)
    strHTML = strHTML & "<table width=""50%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"">" & chr(13) & chr(10)
    strHTML = strHTML & "<tr><td width=""0%"" height=""152"">&nbsp;</td> " & chr(13) & chr(10)
    strHTML = strHTML & "<td width=""30%""><div align=""right[u]""><img src=""www.nsonsgroup.com/images/logo.png"" width=""54"" height=""68""></div></td>" & chr(13) & chr(10)</u> strHTML = strHTML & "<td width=""39%"" valign=""middle"" class=""groupheading""><strong>NSON'S</strong> "& chr(13) & chr(10)
    strHTML = strHTML & "<strong>GROUP</strong></td>" & chr(13) & chr(10)
    strHTML = strHTML & " <td width=""31%"" valign=""top"" class=""groupheading"">"& chr(13) & chr(10)
    strHTML = strHTML & "<div align=""left""> <p>&nbsp;</p>" & chr(13) & chr(10)
    strHTML = strHTML & "<p><strong><br>" & chr(13) & chr(10)
    strHTML = strHTML & " &reg;</strong></p></div></td>" & chr(13) & chr(10)
    strHTML = strHTML & "</tr></table>" & chr(13) & chr(10)
    strHTML = strHTML & "<table width=""708"" border=""0"" cellspacing=""0"" align=""center"" cellpadding=""0""><tr><td height=""132"">&nbsp;</td><td width=""685"" align=""left"" valign=""top"" >" & chr(13) & chr(10)

    HTML = "</td></tr></table><br><BR><BR>"
    HTML = HTML & "<table width=""708"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"">"
    HTML = HTML & "<tr> <td >"

    HTML1 = "</td></tr><tr><td>"

    strHTML5 = "<td align><div align=""right""><a href=""http://www.nsonsgroup.com"" target=""_blank"">http://www.nsonsgroup.com</div></a></td></tr><tr><td>Cel No "

    strHTML1 ="</td> <td ></td></tr></table></td></tr></table><BR>"
    strHTML1 = strHTML1 & "<table width=""708"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"">"
    strHTML1 = strHTML1 & "<tr> <td>&nbsp;</td> <td valign=""top"">"
    strHTML1 = strHTML1 & "<p align=""center""> Rawal Plaza, Westiredge I Market Peshawar Road Rawalpindi Paksitan<br>"
    strHTML1 = strHTML1 & "Ph 0092515465119, 5465148 Fax 5481579 </p>"
    strHTML1 = strHTML1 & "</td> <td>&nbsp;</td>"
    strHTML1 = strHTML1 & "</tr></table>"


   Set Mail = Server.CreateObject("Persits.MailSender")
   ' enter valid SMTP host'
   Mail.Host = strHost

   Mail.From = Session("email") ' From address'
   Mail.FromName = Session("name") ' optional'
   Mail.AddAddress Request("To")
    Mail.AddBcc Request("CC")
   ' message subject'
   Mail.Subject = Request("Subject")
   ' message body'
   Mail.IsHTML = True
     Mail.Body = strHTML & Request("Body") & HTML & Session("name")& HTML1 & objRS2("Designation") & strHTML5 & Session("mob") & strHTML1
  ' Mail.Body = Request("Body")
   strErr = ""
   bSuccess = False
   On Error Resume Next ' catch errors'
   Mail.Send ' send message'
   If Err <> 0 Then ' error occurred'
      strErr = Err.Description
   else
      bSuccess = True
   End If



  The above underline code is the image path which I send with mail but the problem is that Hotmail and Yahoo like servers drop the external links. So the logo cannot seen when the mail recieved
So if there is a solution of this problem then it wil be highly appreciated .
Thanx in advance


Love 4 all
__________________
(*_*)

Numan
--------------------------------------------------
It is not important what you get But important is&nbsp;&nbsp;how you got it
 
Old June 29th, 2004, 07:09 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

Hello qazi_nomi,

You may try the full path including http://. i.e. instead of

www.nsonsgroup.com/images/logo.png

you may use

http://www.nsonsgroup.com/images/logo.png
 
Old June 30th, 2004, 12:18 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

If You are formatting the mail as HTML, then you can use <IMG> tag providing the full path of the image. That should work for you.

Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old June 30th, 2004, 12:38 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Dear happygv you might be not seen the above code
which is

<img src=""www.nsonsgroup.com/images/logo.png"" width=""54"" height=""68"">

And Thanx for madhukp
Bcause
http://www.nsonsgroup.com/images/logo.png
is working quite nicely

Love 4 all





Similar Threads
Thread Thread Starter Forum Replies Last Post
Send mail and attachments with PHP mail function Lofa Beginning PHP 1 June 2nd, 2008 03:24 PM
Send mail with image. dpkbahuguna Beginning VB 6 0 June 19th, 2007 06:47 AM
Sending mail with image content oluseyi ASP.NET 1.0 and 1.1 Professional 3 February 13th, 2007 12:12 PM
problems sending mail with java mail gandacuboy J2EE 2 December 20th, 2006 03:05 PM
Sending both text mail and HTML mail - CDONTS madhukp Classic ASP Basics 1 October 8th, 2003 01:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.