No announcement yet.

Image in New User Confirmation Email

  • Filter
  • Time
  • Show
Clear All
new posts

  • Image in New User Confirmation Email

    I'm trying to include an image in the confirmation email when a new user add themselves through the New User option. But when the email arrives, the image is missing. When I look at the source code of the mail, I see the image reference but it's not displayed. If I echo $mail_message and exit after it's set, the image displays in the echo command.

    Here is the code I have:

    $mail_image = '<img src="../../MySite/_lib/img/grp__NM__img__NM__Drawing.png">';
    {lang_send_actcode_newuser} = $mail_image . {lang_send_actcode_newuser};

    $mail_message = sprintf({lang_send_actcode_newuser}, {name}, $message);

    $mail_subject = {lang_subject_new_user};
    $mail_format = 'H'; // Message format: (T)ext or (H)tml

    // Send email
    '','', '465', 'S');

    Any thoughts on how to get the image to display?

  • #2
    If you send an email with a link to an image you need to supply the full url. The customer receiving a link to ../../ goes nowhere.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development /


    • #3
      Yeah what I was trying to do was include it prior to sending the email, but alas, that doesn't work. After extensive reading I even tried encoding it with Base64 but that didn't work either. So I guess I'll have to create a public image directory on the website and point to it there. Thanks.