0

Click to url on emailed image within sendEmail

I am send out an email to all my customers on  job completion via sendEmail.

The button has the following script the in the email body a Google review image is displayed. from (xGoogle) field.

However Ideally I want to client to click the image (or worse case a text link underneath) to be able to go direct to my website google reviews (using my unique link code from google). Is this doable?. I'm figuring i can't embed it in the image but can the image as a whole be send with a url link attached to it. 

 

here is the script:

if not CEmail then
    alert("No valid contact in email field")
else
    let thisBody := first((select JobBag_Settings).GoogleReview);
    let myEmail := userEmail();
    let log1 := first(select System_Settings).HTMLxLogo;
    let log1 := replace(log1, "{UL1}", shareFile(first(select System_Settings).xLogo));
    let log3 := first(select System_Settings).HTMLxGoogle;
    let log3 := replace(log3, "{UL3}", shareFile(first(select System_Settings).xGoogle));
    thisBody := replace(thisBody, "{Ord Company}", text('Ordered By'));
    thisBody := replace(thisBody, "{Order Name}", text(EContact));
    thisBody := replace(thisBody, "{Qty}", text(Qty));
    thisBody := replace(thisBody, "{Desc}", Desc);
    thisBody := replace(raw(thisBody), "{xLogo}", log1);
    thisBody := replace(raw(thisBody), "{xGoogle}", log3);
    DispFlag := 1;
    Status := "Dispatched";
    sendEmail({
        from: myEmail,
        to: CEmail ;
        subject: "Are you satisfied with our service? - Please review us on Google",
        text: "Google Review",
        html: thisBody
    });
    alert("Google - Review email has been sent")
end

4 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 3 days ago
    • Reported - view

    I seem to know this code.... 馃槏

    You can wrap your <img> tag between an anchor tag in your System_Settings table field xGoogle:

    <a href="WebsiteURL"><img........></a>

      • Mel_Charles
      • 2 days ago
      • Reported - view

       Yes used the basis of the code you gave me previously

      and your latest solution works straight out of th tin. YOU ARE A STAR ! :-)

    • Mel_Charles
    • yesterday
    • Reported - view

     Steven how do i pip a record field name into the subject line in the senEmail emails?

    I have tried cariations of below without success (is it even doable?)

    I can't include it as part of the body section

    let thisSubject := 'Name';   

    thisSubject := replace(thisSubject."{Name}";

    sendEmail({
            from: myEmail,
            to: "mel@xxxxxxxxx.co.uk",
            subject: "Test line for att of {thisSubject}",
            text: "Test only",
            html: thisBody
        })
    end

Content aside

  • yesterdayLast active
  • 4Replies
  • 57Views
  • 2 Following