472,145 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

JMail with attachments send binary data in email

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 example below.

Code Example:
Expand|Select|Wrap|Line Numbers
  1. Set JMail = Server.CreateObject("JMail.SMTPMail") 
  2.  
  3. JMail.ServerAddress = "mailhub.registeredsite.com"
  4. Jmail.ContentType = "text/plain" 
  5.  
  6.  
  7. JMail.Sender = "fromsomeone@testing.com"
  8. JMail.Subject = "Attachement Test"
  9.  
  10.  
  11. JMail.AddRecipient "tosomeone@testing.com"
  12. JMail.Body = "Testing email links"
  13. JMail.Priority = 3
  14. JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
  15. JMail.AddAttachment ("\\atl.hosting.int\storage\IPSWX0013ATL2\userIDNumber\www\testing.txt")
  16.  
  17. JMail.Execute
Email Example:
This is a multipart message in MIME format.
----NEXT_BM_0D8EA709985B46BB912D9180055D5931
Content-Type: text/plain;
charset=so-8859-1"
Content-Transfer-Encoding: Quoted-Printable

Testing email links

----NEXT_BM_0D8EA709985B46BB912D9180055D5931
Content-Type: application/octet-stream; name=?iso-8859-1?Q?testing.txt?=
Content-Transfer-Encoding: base64
Content-Description: =so-8859-1?Q?testing.txt?Content-Disposition: attachment; filename=?iso-8859-1?Q?testing.txt?=
Content-ID: <579B7F14D4EA4EFC8740E1C9CDAE3F08>

VGhpcyBpcyBhIHRlc3QgZmlsZSB0aGF0IEkgaGF2ZSBhdHRhY2 hlZCB0byBh
biBlbWFpbC4

----NEXT_BM_0D8EA709985B46BB912D9180055D5931--
Aug 27 '07 #1
4 8800
Did you find a solution to this problem, I am running into the same thing

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 example below.

Code Example:
Expand|Select|Wrap|Line Numbers
  1. Set JMail = Server.CreateObject("JMail.SMTPMail") 
  2.  
  3. JMail.ServerAddress = "mailhub.registeredsite.com"
  4. Jmail.ContentType = "text/plain" 
  5.  
  6.  
  7. JMail.Sender = "fromsomeone@testing.com"
  8. JMail.Subject = "Attachement Test"
  9.  
  10.  
  11. JMail.AddRecipient "tosomeone@testing.com"
  12. JMail.Body = "Testing email links"
  13. JMail.Priority = 3
  14. JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
  15. JMail.AddAttachment ("\\atl.hosting.int\storage\IPSWX0013ATL2\userIDNumber\www\testing.txt")
  16.  
  17. JMail.Execute
Email Example:
This is a multipart message in MIME format.
----NEXT_BM_0D8EA709985B46BB912D9180055D5931
Content-Type: text/plain;
charset=so-8859-1"
Content-Transfer-Encoding: Quoted-Printable

Testing email links

----NEXT_BM_0D8EA709985B46BB912D9180055D5931
Content-Type: application/octet-stream; name=?iso-8859-1?Q?testing.txt?=
Content-Transfer-Encoding: base64
Content-Description: =so-8859-1?Q?testing.txt?Content-Disposition: attachment; filename=?iso-8859-1?Q?testing.txt?=
Content-ID: <579B7F14D4EA4EFC8740E1C9CDAE3F08>

VGhpcyBpcyBhIHRlc3QgZmlsZSB0aGF0IEkgaGF2ZSBhdHRhY2 hlZCB0byBh
biBlbWFpbC4

----NEXT_BM_0D8EA709985B46BB912D9180055D5931--
Feb 13 '08 #2
CroCrew
564 Expert 512MB
Hello cgrudzinski and daffbuzz,

Have either of you looked at this help page?

http://support.rapidsystem.net/ntfaq/jmail.html
Feb 13 '08 #3
CroCrew
564 Expert 512MB
I think your problems may be with how you’re setting the path to your documents. I think with Jmail you need to set the physical path.

Here is another site that you can look at on how to do that.

http://www.w3schools.com/asp/met_mappath.asp
Feb 13 '08 #4
markrawlingson
346 Expert 100+
I agree with CroCrew. Try using Server.MapPath - which takes a virtual path and translates it into a physical path.

Expand|Select|Wrap|Line Numbers
  1. JMail.AddAttachment ( Server.MapPath( "\your\path\to\doc.txt" ) )
  2.  

I think your problems may be with how you’re setting the path to your documents. I think with Jmail you need to set the physical path.

Here is another site that you can look at on how to do that.

http://www.w3schools.com/asp/met_mappath.asp
Feb 13 '08 #5

Post your reply

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

Similar topics

1 post views Thread by coder_1024 | last post: by
6 posts views Thread by Quarco | last post: by
1 post views Thread by Pravin Prabhu | last post: by
5 posts views Thread by mike w. | last post: by
2 posts views Thread by Slim | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

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.