473,320 Members | 1,580 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,320 software developers and data experts.

Embed Image in text body.

Dear sir,

i would like to bring into your kind info dt i hve desires to embeb image or HTML in text body, & i hope that you will be me in this regard our coding are as below.


Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.HTMLBody="<HTML><BODY><Img src="images/BBaner.jpg"></img></body></html>


JMail.ServerAddress = "127.0.0.1:25"
JMail.Sender = "apceap@brain.net.pk"
JMail.Subject = "Sign-up acknowledgement....."
JMail.AddRecipient emaila
JMail.AddRecipientCC( "apceap@brain.net.pk" )
mailto.BodyFormat = 0
mailto.MailFormat = 0
JMail.Priority = 3
JMail.Execute


Thanking you
KALEEM ULLAH
Feb 6 '08 #1
7 4987
CroCrew
564 Expert 512MB
Hello sheikh11,

Try this:

Expand|Select|Wrap|Line Numbers
  1. JMail.HTMLBody="<img src='http://www.YourWebsite.com/images/BBaner.jpg'>"
  2.  
Hope this helped~
Feb 6 '08 #2
Respected Sir,

Thanks for your earliest response in this regard and to tell you that i have try you valued code , but not working sir,

our true functing code are as below for your information i hve desires to send our members by email our apcea top title of the site as inline image in text body.


<%
dim username, password, emaila, msg, msg2, I, name,a1,b2,c3
username=Session("Username")
Password=Session("Password")
name=Session("Name")
emaila=Session("email")
if emaila="" then
Response.Redirect("Forgot_Password_EmailError.asp" )
else
response.write(username)
response.write(password)
I=I+1
--------------------------------------------------------------------------------------------------
Simply i add topic title of the picture here
-------------------------------------------------------------------------------------------------

a1="Dear"
msg="Welcome to gems.com.pk,here are your account details, you are able to login for updates , to log into your gems account, detail are as below :-"

b2="Best of luck with your career! If you have any feedback or questions , please email us at apceap@brain.net.pk"

msg2="Best Regards,"
Dim Body

Body = Body & "Dear ," & name & vbCrLf

Body = Body & " "& vbCrLf
Body = Body & Msg & vbCrLf

Body = Body & " "& vbCrLf
Body = Body & "Username :" & username & vbCrLf
Body = Body & "Password :" & password & vbCrLf
Body = Body & " "& vbCrLf
Body = Body & " "& vbCrLf
Body = Body & "Member's login "& vbCrLf
Body = Body & "http://www.gems.com.pk/Member_Login.asp"& vbCrLf
Body = Body & " "& vbCrLf
Body = Body & " "& vbCrLf

Body = Body & "Change Password :-" & vbCrLf
Body = Body & "http://www.gems.com.pk/Change_Member_Password.asp"& vbCrLf
Body = Body & " "& vbCrLf
Body = Body & b2 & vbCrLf

Body = Body & " "& vbCrLf
Body = Body & " "& vbCrLf
Body = Body & msg2 & vbCrLf
Body = Body & "APCEA" & vbCrLf


Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "127.0.0.1:25"
JMail.Sender = "apceap@brain.net.pk"
JMail.Subject = "Sign-up acknowledgement....."
JMail.AddRecipient emaila
JMail.AddRecipientCC( "apceap@brain.net.pk" )
JMail.Body = Body
JMail.Execute
'JMail.Nothing
session("email90")=emaila
Response.Redirect("Send_Member_information_2007.as p")
End if

%>


Please do it needful i shall be very thankful to you in this regards.
Feb 7 '08 #3
CroCrew
564 Expert 512MB
Helll sheikh11,

Please look at lines (14, 24, 53).

Hope this helps~

Expand|Select|Wrap|Line Numbers
  1. <%
  2. dim username, password, emaila, msg, msg2, I, name,a1,b2,c3
  3. username=Session("Username")
  4. Password=Session("Password")
  5. name=Session("Name")
  6. emaila=Session("email")
  7. if emaila="" then
  8. Response.Redirect("Forgot_Password_EmailError.asp")
  9. else
  10. response.write(username)
  11. response.write(password)
  12. I=I+1
  13.  
  14. xpicture = "<img src='http://www.YourWebsite.com/images/BBaner.jpg'>"
  15.  
  16. a1="Dear"
  17. msg="Welcome to gems.com.pk,here are your account details, you are able to login for updates , to log into your gems account, detail are as below :-"
  18.  
  19. b2="Best of luck with your career! If you have any feedback or questions , please email us at apceap@brain.net.pk"
  20.  
  21. msg2="Best Regards,"
  22. Dim Body 
  23.  
  24. Body = xpicture & vbCrLf 
  25.  
  26. Body = Body & "Dear ," & name & vbCrLf
  27.  
  28. Body = Body & " "& vbCrLf 
  29. Body = Body & Msg & vbCrLf 
  30.  
  31. Body = Body & " "& vbCrLf 
  32. Body = Body & "Username :" & username & vbCrLf 
  33. Body = Body & "Password :" & password & vbCrLf
  34. Body = Body & " "& vbCrLf 
  35. Body = Body & " "& vbCrLf 
  36. Body = Body & "Member's login "& vbCrLf 
  37. Body = Body & "http://www.gems.com.pk/Member_Login.asp"& vbCrLf 
  38. Body = Body & " "& vbCrLf 
  39. Body = Body & " "& vbCrLf 
  40.  
  41. Body = Body & "Change Password :-" & vbCrLf 
  42. Body = Body & "http://www.gems.com.pk/Change_Member_Password.asp"& vbCrLf 
  43. Body = Body & " "& vbCrLf 
  44. Body = Body & b2 & vbCrLf 
  45.  
  46. Body = Body & " "& vbCrLf 
  47. Body = Body & " "& vbCrLf 
  48. Body = Body & msg2 & vbCrLf 
  49. Body = Body & "APCEA" & vbCrLf 
  50.  
  51.  
  52. Set JMail = Server.CreateObject("JMail.SMTPMail")
  53. JMail.BodyFormat = MailFormat.Html
  54. JMail.ServerAddress = "127.0.0.1:25"
  55. JMail.Sender = "apceap@brain.net.pk"
  56. JMail.Subject = "Sign-up acknowledgement....."
  57. JMail.AddRecipient emaila
  58. JMail.AddRecipientCC( "apceap@brain.net.pk" )
  59. JMail.Body = Body
  60. JMail.Execute 
  61. 'JMail.Nothing
  62. session("email90")=emaila
  63. Response.Redirect("Send_Member_information_2007.asp") 
  64. End if
  65.  
  66. %>
  67.  
  68.  
Feb 7 '08 #4
Thnks for earliest respone in this regards sir, i hve try your Code once agian but not working , this error are display

There is a problem with the page you are trying to reach and it cannot be displayed.

once again our code are as below:

<%
dim username, password, emaila, msg, msg2, I, name,a1,b2,c3
username=Session("Username")
Password=Session("Password")
name=Session("Name")
emaila=Session("email")
if emaila="" then
Response.Redirect("Forgot_Password_EmailError.asp" )
else
response.write(username)
response.write(password)
I=I+1
xpicture = "<img src='http://www.gems.com.pk/images/BBaner.jpg'>"
a1="Dear"
msg="Welcome to gems.com.pk,here are your account details, you are able to login for updates , to log into your gems account, detail are as below :-"

b2="Best of luck with your career! If you have any feedback or questions , please email us at apceap@brain.net.pk"

msg2="Best Regards,"
Dim Body

Body = xpicture & vbCrLf
Body = Body & "Dear ," & name & vbCrLf

Body = Body & " "& vbCrLf
Body = Body & Msg & vbCrLf

Body = Body & " "& vbCrLf
Body = Body & "Username :" & username & vbCrLf
Body = Body & "Password :" & password & vbCrLf
Body = Body & " "& vbCrLf
Body = Body & " "& vbCrLf
Body = Body & "Member's login "& vbCrLf
Body = Body & "http://www.gems.com.pk/Member_Login.asp"& vbCrLf
Body = Body & " "& vbCrLf
Body = Body & " "& vbCrLf

Body = Body & "Change Password :-" & vbCrLf
Body = Body & "http://www.gems.com.pk/Change_Member_Password.asp"& vbCrLf
Body = Body & " "& vbCrLf
Body = Body & b2 & vbCrLf

Body = Body & " "& vbCrLf
Body = Body & " "& vbCrLf
Body = Body & msg2 & vbCrLf
Body = Body & "APCEA" & vbCrLf


Set JMail = Server.CreateObject("JMail.SMTPMail"
JMail.BodyFormat = MailFormat.Html
JMail.ServerAddress = "127.0.0.1:25"
JMail.Sender = "apceap@brain.net.pk"
JMail.Subject = "Sign-up acknowledgement....."
JMail.AddRecipient emaila
JMail.AddRecipientCC( "apceap@brain.net.pk" )
JMail.Body = Body
JMail.Execute
'JMail.Nothing
session("email90")=emaila
Response.Redirect("Send_Member_information_2007.as p")
End if

%>


Please sir do it needful i shall be very thankful to you.
THANKS
Feb 8 '08 #5
CroCrew
564 Expert 512MB
I think the problem might be :Response.Redirect("Send_Member_information_2007.a sp")

Can you verify that the file "Send_Member_information_2007.asp" is in the same folder that this page is in and that page has no errors within it.

Thanks~
Feb 8 '08 #6
Thanks alote respected sir ,

i hve try your valuable code but not working i am so confused that why is not working,

sir , i requested to you in this regard please kindly send me such code that only simply i send the top title of the website .

i means


send email
recipt email
simple picture embed from our website as a inline image in text body

our website name is www.gems.com.pk/images/BBaner.jpg

i shall be very thankful to you in this regards.

Thanking you
Kaleem Ullah
Feb 9 '08 #7
CroCrew
564 Expert 512MB
Hello sheikh11,

I am not familiar with using “JMail” as my mail object. But from a quick google I found this site that should help out with your problem:

http://www.webwizguide.com/kb/asp_tu...l_tutorial.asp

I exclusively use “Persits” for my mail object and sometimes “CDO” too. If you can give a look at Persits’s website http://www.aspemail.com it’s free.

Hope that site helps~
Feb 9 '08 #8

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

Similar topics

2
by: Siv | last post by:
Hi, I have written an application which is used by sales staff when discussing products with their customers over the phone. It is a database application that holds detailed information about...
1
by: snicks | last post by:
I have a series of XLS files which I need to embed into a PowerPoint presentation on an IIS server. I’ll be using VB.NET. I’ve tried using an ASPOSE.PowerPoint control to do this and it does...
24
by: Manuel | last post by:
Is it possible to embed an image, like a company logo in a CDOSYS generated message? If yes, I´ll apreciate some code sample. I´ve been able to format messages in html the way I like, but I...
6
by: qualitychecker | last post by:
Hello thanks for your help.. I try to reference a PHP module from within a HTML file, see below ---------------------------------------- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">...
6
by: Rob | last post by:
Hello, I'm sure this has come up before. I have need for a collection of all elements/objects in an HTML document that have any kind of an attribute (HTML or CSS) that is making use of a URL to...
19
by: ginahong | last post by:
Hi, I'm new with perl. I'm writting a perl script to read a text file to email the contract managers to warn them there are some contracts with High risks waiting for them to view. The text file...
0
by: =?Utf-8?B?TWFyazEyMw==?= | last post by:
I have two pieces of VB.NET code below: a) Sends an email b) Returns a programmatically created jpeg image to a webpage. How can I embed the programmatically created jpeg into an HTML...
3
by: raamay | last post by:
I am trying to embed company logo (image) in an html email which i am sending using PHP mail function. I tried the following way but didnt work. So, I am not sure how to go about. Please see my code...
1
pbala
by: pbala | last post by:
How to insert a image in message body and send it to Outlook express using SMTP? I used this code to attach a image file, i want to Embed the images in message.. public void SendMail(string...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.