Email Using LiveCode Server?

Matthias Rebbe | M-R-D matthias_livecode_150811 at
Tue Apr 22 07:01:15 EDT 2014

Hi Scott,

if you need to reply to the address the customer entered in the form, then you could 
adjust the script a little bit:

// add the parameter pReplyTo to the parameter list

//command mail pTo, pSub, pMsg, pFrom, pCc, pBcc, pHtml, pAtts
command mail pTo, pSub, pMsg, pFrom, pReplyTo, pCc, pBcc, pHtml, pAtts

    local tMsg

    -- build the message header, adding the from, to and subject details
    -- we also put any cc addresses in here, but not bcc (bcc addresses hidden)
    put "From:" && pFrom & return & "To:" && pTo & return & "Subject:" && pSub & return into tMsg    

//add this three lines //
    if pReplyTo is not empty then
       put "Reply-to:" && pReplyTo & return after tMsg
    end if
// END add this three lines //

  if pCc is not empty then
       put "Cc:" && pCc & return after tMsg
    end if
. . . . 

You just have to set the pReplyTo variable with the email address of the customer.

And don´t forget to call the command "mail" with the newly added parameter

mail pTo, pSub, pMsg, pFrom, pReplyTo, pCc, pBcc, pHtml, pAtts

With that adjustments the email is sent and you can still reply to the customer address.



Am 22.04.2014 um 01:06 schrieb Scott Rossi <scott at>:

> Thanks to Alex and Matthias for the responses.  Matthias's comment
> prompted me to do some more searching and I found the problem, which was
> partly script related, and partly host related: outside-domain email
> addresses are not allowed.
> Some time ago, DreamHost stepped up their anti-spam practices, and
> disabled the ability of sending mail from an address that is not connected
> to any of your hosted domains.  Clearly this makes sense.  But the form I
> have uses the sender's email in the "from" variable, which apparently gets
> rejected by the mail process.  As soon as I changed the "from" address to
> one of my domain addresses, sendmail worked right away.
> [ bloody forehead slap ]
> Thanks all.
> Regards,
> Scott Rossi
> Creative Director
> Tactile Media, UX/UI Design
> On 4/21/14 11:51 AM, "Scott Rossi" <scott at> wrote:
>> I'm wondering if anyone has a working example of sending email from
>> LiveCode server.
>> I'm trying to send mail using LC server on a site, and following the
>> RunRev
>> lesson:
>> e
>> rver-Scripts
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list