473,395 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

PROBLEMS with JMAIL - attachment image sent as text

Hi! PLEASE need help!

My aim is to make a newsletter, therefor I need a picture to go a long with the mail I am creating from a mailinglist. When I am opening my mail I dont get my picture but a "picture icon" (the one you get when you place a picture on a webside without a file reference). and I also get "many many" characters/letters, so it seems that the source code finds the picture but is having problems translating it through Email.

What could be the problem ? maybe version of Jmail ? the source code?
the code is like this....

Expand|Select|Wrap|Line Numbers
  1. ' Først må vi hente en og en adresse fra Mailinglista
  2.     Do until mailRS.EOF
  3.  
  4.         fromWho = "post@golfXperten.no"
  5.         toWho = mailRS( "mail_address" )
  6.  
  7.         response.write towho
  8.  
  9.         ' Her lages mailen
  10.         Set JMail = Server.CreateObject ("JMail.SMTPMail")
  11.  
  12. ' reference to the image in the HTMLBody.
  13. contentId = JMail.AddAttachment(System.AppDomain.CurrentDomain.BaseDirectory() & "tilbud1.jpg", True, "image/jpeg")
  14.  
  15.         JMail.ContentType = "text/html"
  16.  
  17.          ' Below you should enter your own SMTP-server
  18.            JMail.ServerAddress = "smtp.cliche.no"
  19.  
  20.         bilde = JMail.AddAttachment(Server.MapPath("/imagestilbud/tilbud1.jpg"))
  21.  
  22.           JMail.Sender = fromWho
  23.            JMail.Subject = "Tilbudsmail"
  24.  
  25.           JMail.AddRecipient toWho
  26.  
  27.  
  28.  
  29. strContents = "<html><body><font color=""red"">Hi, here is a nice picture:</font><br><img src=""cid:" & contentId & """><br><br>good one huh?</body></html>"
  30. jm.HTMLBody = strContents
  31.  
  32.         'JMail.body = "<HTML><BODY BGCOLOR=""#aaaaaa"" TEXT=""#000000"">Hello world</BODY></HTML>"
  33.         'JMail.htmlbody = "<img src=" & bilde & ">"
  34.         JMail.Priority = 3
  35.  
  36.         JMail.Charset = "ISO-8859-1"
  37.            JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
  38.            JMail.Execute
  39.         Set JMail = Nothing
  40.  
  41.         mailRS.MOVENEXT
  42.         response.write " ---- "
  43.     LOOP
  44.  
  45.     mailRS.close
  46.     SET mailRS = nothing
Aug 13 '07 #1
0 2311

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: knoak | last post by:
Hi there, I've found a script at these great Google fora. a script to send emails with attachments. The script is below this message, name etc. aren't mine, but from the original post. My...
0
by: Lasse Edsvik | last post by:
Hello I was wondering if you guys have tried to use JMail's AddURLAttachment when mailing? i cant get that simple thing to work. i have this: <% set...
0
by: Lasse Edsvik | last post by:
Hello I use this code to send massmail with an attachment using JMail 4 proffessional. and the attachment seems to be attached but when i open it the first time my system32 folder opens..........
4
by: Kingdom | last post by:
Having a problem with a jmail email script and cannot seem to solve this error any sugestions welcome. Error shows in browser as Microsoft VBScript runtime error '800a01f4' Variable is...
0
by: BDKiii | last post by:
Ok.. I know this has been covered before -but- here it is again... I installed Jmail to my server and tested it... and it worked fine. I then installed W#.Upload to the same server and tested it to...
8
by: Mangler | last post by:
I am new to Jmail/ASP and either need some help or someone to tell me I am stupid... I got Jmail to work fine. My problem is I need to send an email based on somthing a customer submitted. ...
0
by: johnet | last post by:
Error: jmail.SMTPMail error '8000ffff' Cannot open file L:/ems/mail/hi.html Code: <% DIM strEmail, strFirstName, strLastName, strSubject, strComments, Mailer
4
by: cgrudzinski | last post by:
Hello, I have JMail working without attachments but now want to start using this feature. When using the .addattachment though the email received contains the binary data of the attachment - see...
1
by: zxon | last post by:
I want to be able to track when recipients have opened an email that I have sent to them using JMail. I've searched the internet for a solution and so far cannot find one. I've found these two...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.