Currently I'm working on a solution, from which the customer needs to send newsletters using the great Mail Engine created by Tim G.
But the client is not happy about the images that are used to layout the e-mail template is being attached to the sent e-mail. I know this has to do with the images being replaced with a cid.
Therefore I need to modify the code in the helper.cs file so I get the url to the image instead. I'm not sure how much should be changed but I don't think it's enough to outcomment linke 183, which reads: body = body.Replace(image, "cid:" + contentId);
But I'm having some trouble breaking down the code and fully understand what it does and why. So I would be very happy if someone could give me a few hints on what to do :-)
I don't know that much about how html-email are normally treated etc. only that it's possible to avoid the images being attached to the e-mail.
I was to fast there. Did just check in gmail yesterday since I don't use either Thunderbird or Outlook at home. Here at work I have just checked in outlook and the images are not showing.
But that's not so weird afterall since the image src looks like this:
Just solved the issue by doing what Peter is suggesting in his first post.
I commented line 163-194 (not 199 since this seems to break the engine) and in my HTML e-mail I just put <base href="http://mydomain"> and now it's working :)
Modifying the Mail Engine from nibble.be
Hi
Currently I'm working on a solution, from which the customer needs to send newsletters using the great Mail Engine created by Tim G.
But the client is not happy about the images that are used to layout the e-mail template is being attached to the sent e-mail. I know this has to do with the images being replaced with a cid.
Therefore I need to modify the code in the helper.cs file so I get the url to the image instead. I'm not sure how much should be changed but I don't think it's enough to outcomment linke 183, which reads: body = body.Replace(image, "cid:" + contentId);
But I'm having some trouble breaking down the code and fully understand what it does and why. So I would be very happy if someone could give me a few hints on what to do :-)
I don't know that much about how html-email are normally treated etc. only that it's possible to avoid the images being attached to the e-mail.
The source code for the project can be found here: http://www.nibble.be/temp/MailEngine.zip
/Jan
Hi Jan,
I think you can safely comment line 163 to 194 (from else to the matching })
Also comment line 199 (attaches the images)
HTH,
Peter
Spoke too soon I guess....
comment out line 172 to 193 EXCEPT line 192
That should do the trick (my first answer doesn't give you http-images, just relative paths)
Hi Peter
Thank you very much - this seems to have done the trick! :-)
/Jan
I was to fast there. Did just check in gmail yesterday since I don't use either Thunderbird or Outlook at home. Here at work I have just checked in outlook and the images are not showing.
But that's not so weird afterall since the image src looks like this:
Now I just can't figure out why the domain is being repeated so many times?
/Jan
Just solved the issue by doing what Peter is suggesting in his first post.
I commented line 163-194 (not 199 since this seems to break the engine) and in my HTML e-mail I just put <base href="http://mydomain"> and now it's working :)
/Jan
is working on a reply...