Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 29th, 2004, 06:47 AM
Friend of Wrox
Points: 1,288, Level: 14
Points: 1,288, Level: 14 Points: 1,288, Level: 14 Points: 1,288, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2004
Location: Stockholm, Sweden
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
Reply With Quote
  #2 (permalink)  
Old June 29th, 2004, 07:09 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
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
Reply With Quote
  #3 (permalink)  
Old June 30th, 2004, 12:18 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
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
Reply With Quote
  #4 (permalink)  
Old June 30th, 2004, 12:38 AM
Friend of Wrox
Points: 1,288, Level: 14
Points: 1,288, Level: 14 Points: 1,288, Level: 14 Points: 1,288, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2004
Location: Stockholm, Sweden
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 05:35 AM.


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