[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Sending image with ASPEmail - bypass windows security

Posted on 2006-05-18
14
Medium Priority
?
422 Views
Last Modified: 2008-01-09
Hi,

From my website I'm sending an E-mail with ASPEmail.
In the body of this E-mail I've added an image.
However when the user receives this E-mail the image is blocked by Windows security.
Is there a way to bypass this behaviour (f.e. loading it into the E-mail so it doesn't have to be downloaded from the internet)?
Or is there any other way to accomplish this?

Regards,
Stef
0
Comment
Question by:Stef Merlijn
14 Comments
 
LVL 22

Expert Comment

by:Ivo Stoykov
ID: 16706779
Hello Delphiwizard,

you cannot change the receipient security policies.

HTH

I
0
 

Author Comment

by:Stef Merlijn
ID: 16706844
That is not my idea.
The reason I ask this, is because I too receive sometimes E-mails with images in the body. Maybe they use stationary or any other kind of way to send the image in the body.
0
 
LVL 11

Expert Comment

by:kelvinwkw
ID: 16706897
May i suggest you to place the image file on a http server where no security policies are enforce,
the email contain the link to the source of the image file


Regards
Kelvin
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Stef Merlijn
ID: 16706930
I thought the security was about receiving a E-mail with a linked image (to a http-address)
So a none security HTTP server would not do any good then...
0
 
LVL 11

Accepted Solution

by:
kelvinwkw earned 700 total points
ID: 16706949
then you may store the image into database as binary,
retrieved them and write them in asp and send out

but this might cause delay when blasting out a numbers
of email

Regards
Kelvin
0
 

Author Comment

by:Stef Merlijn
ID: 16706969
I do have an MySQL database on the server.
Can you tell me how to access the database and add the image from there into the E-mailbody with ASP?
0
 
LVL 11

Expert Comment

by:kelvinwkw
ID: 16706997
0
 
LVL 11

Expert Comment

by:kelvinwkw
ID: 16707010
Oh ya before that, kindly check for the authentication set for the image directory, see whether it allow read permission for
IUSR_COMPUTER
0
 
LVL 7

Assisted Solution

by:chisholmd
chisholmd earned 300 total points
ID: 16707113
I have my Thunderbird client to not load remote images, that way the spammer doesn't get the hit in his log confirming that I have received and looked at the email.

I still get spam with images, they are not attachements they are inline.

Here some of the contents of these emails:
...
MIME-Version: 1.0
Content-Type: multipart/related;
      type="multipart/alternative";
      boundary="----=_NextPart_000_0004_01C662EA.8E75C530"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-Antivirus: avast! (VPS 0616-4, 04/21/2006), Inbound message
X-Antivirus-Status: Clean

This is a multi-part message in MIME format.

------=_NextPart_000_0004_01C662EA.8E75C530
Content-Type: multipart/alternative;
      boundary="----=_NextPart_001_0005_01C662EA.8E75C530"


------=_NextPart_001_0005_01C662EA.8E75C530
Content-Type: text/plain;
      charset="koi8-r"
Content-Transfer-Encoding: quoted-printable


------=_NextPart_001_0005_01C662EA.8E75C530
Content-Type: text/html;
      charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dkoi8-r">
<META content=3D"MSHTML 6.00.2900.2180" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2><A href=3D"http://onjrpk.outskirtssite.com/?67139165"><IMG alt=3D"" =
hspace=3D0=20
src=3D"cid:000301c662d1$69261c30$aa0fa8c0@sanya" align=3Dbaseline=20
border=3D0></A></FONT></DIV></BODY></HTML>

------=_NextPart_001_0005_01C662EA.8E75C530--

------=_NextPart_000_0004_01C662EA.8E75C530
Content-Type: image/gif;
      name="list9.gif"
Content-Transfer-Encoding: base64
Content-ID: <000301c662d1$69261c30$aa0fa8c0@sanya>

R0lGODlh/wFvAfcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/
/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm
AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/
MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm
ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/
mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm
zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/
....
And of course a bunch more of this encoding image.

So doesn't show up as an attachment and its not a remote image.  Umm I might have thunderbird set to show attached images inline but I don't think so...

Anyway its not an answer to your question but hopefully the info will help.  Your not sending spam are you?
0
 

Author Comment

by:Stef Merlijn
ID: 16707172
No I don't send spam.
On my website a cliënt can enter their contactinformation which then is send to me and a copy is send to the client as well.
It's just a matter of making it all looking more professional.

Currently the image is loaded from the webserver, like:
   strHTML = strHTML & "<img border=""0"" src=""http://www.mydomain.nl/Images/Logo.JPG"" width=""185"" height=""75"" align=""left"" vspace=""6"" hspace=""0""> </p>"

When I'm correct I could paste the binary image directly into my ASP-code in stead of retrieving it from a database.
Can any of you give me an example on how to add a binary image into the HTML-body?
0
 
LVL 11

Expert Comment

by:kelvinwkw
ID: 16707217
'Display the contents of the record as an image
 'create connection
if not rs.eof then

 'Response.ContentType = "image/gif"
 Response.ContentType = "image/JPEG"

 Response.BinaryWrite(rs("binaryDataFromDB"))

end if

' close connection
0
 

Author Comment

by:Stef Merlijn
ID: 16737956
Hi Guys,

I'm still have no solution for mu problem.
> When I'm correct I could paste the binary image directly into my ASP-code in stead of retrieving it from a database.
> Can any of you give me an example on how to add a binary image into the HTML-body?

I think the following is the binary code for my JPG-file.
How do I add that in stead of using:
<img border=""0"" src=""http://www.mydomain.nl/Images/Logo.JPG"" width=""185"" height=""75"" align=""left"" vspace=""6"" hspace=""0"">

/9j/4AAQSkZJRgABAQEAYABgAAD/4QAWRXhpZgAASUkqAAgAAAAAAAAAAAD/2wBDAAgGBgcGBQgH
BwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/
2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy
MjIyMjIyMjIyMjL/wAARCABLALkDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQF
BgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS
0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4
eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi
4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA
AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl
8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImK
kpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP0
9fb3+Pn6/9oADAMBAAIRAxEAPwD1Hxz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WbV8+TavqNzY
pZzXcj2yKoWM4wABxSRavqEFgbGK7kS1IIMQxjB5P6k1ssO7JX2M3VV2dz8Gv+RsH0H8mr6Jr52+
Df8AyNv4D+TV9E1livjNKHwi0UUVymwUUUUAFFFFABRRRQAV88+IPh14i1bWZbyC2CRuAAJA4PA9
lNfQ1Fa0qrp3sROCnufM3/CqfFH/ADwi/wDIn/xFH/CqfFH/ADwi/wDIn/xFfTNFa/WpdjP2C7nz
N/wqnxR/zwi/8if/ABFH/CqfFH/PCL/yJ/8AEV9M0UfWpdg9gu58zf8ACqfFH/PCL/yJ/wDEUf8A
CqfFH/PCL/yJ/wDEV9M0UfWpdg9gu58zf8Kp8Uf88Iv/ACJ/8RR/wqnxR/zwi/8AIn/xFfTNFH1q
XYPYLufO2l+BfHOjGQ2DRxCXG9SrsGx06p71Df8Aw78aanOJr3ZM4G0ZDgKPQAJgV9H0UliWnew/
Yra58zf8Kp8Uf88Ivyk/+Io/4VT4o/54Rf8AkT/4ivpmin9bl2F7Bdzxb4ceCta8O+JEuL+AeU/G
5A2BweuQPWvaKWisalRzd2aQhyqx/9k=
0
 
LVL 11

Assisted Solution

by:kelvinwkw
kelvinwkw earned 700 total points
ID: 16748068
Do this one as you pull the imnages from the Db

 Response.ContentType = "image/JPEG"
 Response.BinaryWrite(rs("binaryDataFromDB"))


Regards
Kelvin
0
 

Author Comment

by:Stef Merlijn
ID: 16749208
But how to connect to the DB, get the right table and field, etc.???
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Loops Section Overview
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question