eDition Documentation

  • Increase font size
  • Default font size
  • Decrease font size

Print Recommend

  • Send email to friend

    actionCommand("sendMailToFriend",toMail,mailDataObj)

    toMail: STRING - mail
    mailDataObj: OBJECT (required) 
    mailDataObj.toName // receiver's name
    mailDataObj.fromName // sender 
    mailDataObj.fromMail // default: friend@edition-on.net
    mailDataObj.body // message of email (html structure)
    mailDataObj.subject // subject line 
    mailDataObj.callback  - returns mail sent status
    edition system replace this string in body with:
    ###EditionURLwPAGE###  - link to edition with current page
    ###EditionURL###  - link to edition

    var TH=this;
    TH.IsSentOK=function(isOK){
      // isOK gets true or false
    }
    var callbackIsSent= {scope: TH, func:TH.IsSentOK, args:[]};

    var mailObject = new Object ();
    mailObject.toName = "My friend Peter";
    mailObject.fromName = "Bilojko";
    mailObject.fromMail= "test@edition-on.net";
    mailObject.body= "<html><head></head><body>My message<br /> <a href='###EditionURLwPAGE###'>Click here</a></body></html>";
    mailObject.subject= "Check this out!";
    mailObject.callback= callbackIsSent;

    actionCommand("sendMailToFriend","info@edition-on.net",mailObject)

    Download Send mail to a friend example