Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 08, 2010 @ 20:55
    Jan Skovgaard
    0

    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

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Feb 08, 2010 @ 21:07
    Peter Dijksterhuis
    0

    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

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Feb 08, 2010 @ 21:14
    Peter Dijksterhuis
    2

    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)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 08, 2010 @ 21:20
    Jan Skovgaard
    0

    Hi Peter

    Thank you very much - this seems to have done the trick! :-)

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 09, 2010 @ 09:30
    Jan Skovgaard
    0

    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:

    <img src="http://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.comhttp://mydomain.com/images/email/sep.gif" width="182" height="9" border="0" hspace="0" vspace="0" align="left">

    Now I just can't figure out why the domain is being repeated so many times?

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 09, 2010 @ 09:54
    Jan Skovgaard
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft