Sending mail from on-server

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Sending mail from on-server

Pyyhtiä Christer
Runrev support does not respond, so asking help from the community.

There used to be a good code strip in the LC guides, which allowed kicking out e-mail from the server. Great way to automate a lot of follow-up and support for your app.

For a couple of weeks ago someone changed something in the server, and the mail capability stopped from working.  I got an advice from on-rev support to use

shell command /usr/bins/sendmail -t < filename, where in the file you have lines to:emailaddr / from:emailaddr / subject:subject / then body.

Now, how to put it exactly in LC

shell ("/usr/bins/sendmail -t < filename")

As you store your filename in your own domain area, the sendmail command responds an error cannot allocate memory:

- do I have to shovel my file into some special area?
- do I have to issue username & password with the filename somewhere?
- or something else?

I have succeeded protecting myself from Unix so far, so happily copy a working solution here.

thx


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Sending mail from on-server

Dave Kilroy
Hi Christer

I also think there is a problem with access to shell via on-rev (I'm on pancake)

About a week ago I was messing around with Business Academy Lesson 53 (using LiveCode Server and Post to relay an email) and couldn't get anywhere. The server-side script and app were both pretty much exactly the same as in the lesson; specifically I would post up to the server like this:

post theSubject & "&" & theFrom & "&" & theMessage to URL \ "http://applicationinsight.com/apps/email/newvehicle.lc"

And then directly after check 'it' - which did not return an error. So my local app thinks everything is OK - but no email gets sent.

The server-side script I'm using is a more-or-less copy from this lesson http://lessons.runrev.com/s/lessons/m/4070/l/8184-sending-emails-from-livecode-server-scripts (but with an added line "if the result is not empty then put the result" as recommended by Kevin in the accompanying Lesson 53 video

Interestingly, during my debugging attempts I once sent the POST message by mistake to the address in the lesson (runtime.on-rev.com) and straight away got a CC copy of the email in my inbox - so it works just fine on other servers - just not on mine.

So SOMETHING is wrong with access to shell on the server (my current theory is that they need to authorise access to it on an individual basis and I've never tried to use it before). Christer did you by any chance get moved to pancake recently? If so could it be an authorisation issue?

By the way I emailed support@on-rev about a week ago and apart from the automated reply never heard any more from them...

Can any of you shed some light?

Kind regards

Dave
"The first 90% of the task takes 90% of the time, and the last 10% takes the other 90% of the time."
Peter M. Brigham
Reply | Threaded
Open this post in threaded view
|

Re: Sending mail from on-server

Roger Eller
It's also possible that your server needs an email server service
installed, or at least configured.

~Roger
On Oct 3, 2013 5:13 AM, "Dave Kilroy" <[hidden email]> wrote:

> Hi Christer
>
> I also think there is a problem with access to shell via on-rev (I'm on
> pancake)
>
> About a week ago I was messing around with Business Academy Lesson 53
> (using
> LiveCode Server and Post to relay an email) and couldn't get anywhere. The
> server-side script and app were both pretty much exactly the same as in the
> lesson; specifically I would post up to the server like this:
>
> post theSubject & "&" & theFrom & "&" & theMessage to URL \
> "http://applicationinsight.com/apps/email/newvehicle.lc"
>
> And then directly after check 'it' - which did not return an error. So my
> local app thinks everything is OK - but no email gets sent.
>
> The server-side script I'm using is a more-or-less copy from this lesson
>
> http://lessons.runrev.com/s/lessons/m/4070/l/8184-sending-emails-from-livecode-server-scripts
> <
> http://lessons.runrev.com/s/lessons/m/4070/l/8184-sending-emails-from-livecode-server-scripts
> >
> (but with an added line "if the result is not empty then put the result" as
> recommended by Kevin in the accompanying Lesson 53 video
>
> Interestingly, during my debugging attempts I once sent the POST message by
> mistake to the address in the lesson (runtime.on-rev.com) and straight
> away
> got a CC copy of the email in my inbox - so it works just fine on other
> servers - just not on mine.
>
> So SOMETHING is wrong with access to shell on the server (my current theory
> is that they need to authorise access to it on an individual basis and I've
> never tried to use it before). Christer did you by any chance get moved to
> pancake recently? If so could it be an authorisation issue?
>
> By the way I emailed support@on-rev about a week ago and apart from the
> automated reply never heard any more from them...
>
> Can any of you shed some light?
>
> Kind regards
>
> Dave
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Sending-mail-from-on-server-tp4670581p4670583.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Sending mail from on-server

Andrew Kluthe-2
It's not entirely free but I use a service called Postmark to send emails
for me so that they are less likely to hit spam folders.

It is basically an email delivery system that can use a REST api for
sending mails. You get 1000 credits when you sign up for free and can
purchase more credits for 1.50 per thousand emails.

Most of my emails get sent out from my backend now, but Im sure I still
have a postmark library laying around. If I can't find it, I would be happy
to flesh out the basics again real fast.



On Thu, Oct 3, 2013 at 6:30 AM, Roger Eller <[hidden email]>wrote:

> It's also possible that your server needs an email server service
> installed, or at least configured.
>
> ~Roger
> On Oct 3, 2013 5:13 AM, "Dave Kilroy" <[hidden email]> wrote:
>
> > Hi Christer
> >
> > I also think there is a problem with access to shell via on-rev (I'm on
> > pancake)
> >
> > About a week ago I was messing around with Business Academy Lesson 53
> > (using
> > LiveCode Server and Post to relay an email) and couldn't get anywhere.
> The
> > server-side script and app were both pretty much exactly the same as in
> the
> > lesson; specifically I would post up to the server like this:
> >
> > post theSubject & "&" & theFrom & "&" & theMessage to URL \
> > "http://applicationinsight.com/apps/email/newvehicle.lc"
> >
> > And then directly after check 'it' - which did not return an error. So my
> > local app thinks everything is OK - but no email gets sent.
> >
> > The server-side script I'm using is a more-or-less copy from this lesson
> >
> >
> http://lessons.runrev.com/s/lessons/m/4070/l/8184-sending-emails-from-livecode-server-scripts
> > <
> >
> http://lessons.runrev.com/s/lessons/m/4070/l/8184-sending-emails-from-livecode-server-scripts
> > >
> > (but with an added line "if the result is not empty then put the result"
> as
> > recommended by Kevin in the accompanying Lesson 53 video
> >
> > Interestingly, during my debugging attempts I once sent the POST message
> by
> > mistake to the address in the lesson (runtime.on-rev.com) and straight
> > away
> > got a CC copy of the email in my inbox - so it works just fine on other
> > servers - just not on mine.
> >
> > So SOMETHING is wrong with access to shell on the server (my current
> theory
> > is that they need to authorise access to it on an individual basis and
> I've
> > never tried to use it before). Christer did you by any chance get moved
> to
> > pancake recently? If so could it be an authorisation issue?
> >
> > By the way I emailed support@on-rev about a week ago and apart from the
> > automated reply never heard any more from them...
> >
> > Can any of you shed some light?
> >
> > Kind regards
> >
> > Dave
> >
> >
> >
> > --
> > View this message in context:
> >
> http://runtime-revolution.278305.n4.nabble.com/Sending-mail-from-on-server-tp4670581p4670583.html
> > Sent from the Revolution - User mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



--
Regards,

Andrew Kluthe
[hidden email]
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Sending mail from on-server

Dave Kilroy
Hi, I decided to email support again and got the following reply:

Thank you for your request.

We are very much aware of this issue and are actively working on it. As soon as we
have a solution we will let you know.

Regards,

Heather
Roger I use my on-rev account to send and receive emails so does that mean an email server service is working OK?

Andrew thanks for the info on Postmark, sounds interesting - but please do be careful who you tell that your emails "get sent from your backend" :)

Dave
"The first 90% of the task takes 90% of the time, and the last 10% takes the other 90% of the time."
Peter M. Brigham
Reply | Threaded
Open this post in threaded view
|

Re: Sending mail from on-server

Roger Eller
On Thu, Oct 3, 2013 at 11:35 AM, Dave Kilroy wrote:

> Hi, I decided to email support again and got the following reply:
>
>
> > Thank you for your request.
> >
> > We are very much aware of this issue and are actively working on it. As
> > soon as we
> > have a solution we will let you know.
> >
> > Regards,
> >
> > Heather
>
> Roger I use my on-rev account to send and receive emails so does that mean
> an email server service is working OK?
>

Yes. If you're able to send emails via server scripts then the email
service is working.  There could be more than one server configured to do
this, so as the support email suggests, they are aware and are working on
it.  I don't have on-rev btw, but have delt with smtp services before.


>
> Andrew thanks for the info on Postmark, sounds interesting - but please do
> be careful who you tell that your emails "get sent from your backend" :)
>

Is that server configured for assynchronous communications?  <shameful>


>
> Dave
> --


~Roger
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Sending mail from on-server

mwieder
Roger-

Thursday, October 3, 2013, 11:44:11 AM, you wrote:

> Is that server configured for assynchronous communications?  <shameful>

<groan>

--
-Mark Wieder
 [hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
--
 Mark Wieder
 ahsoftware@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: Sending mail from on-server

Andrew Kluthe-2
<ZING!>


On Thu, Oct 3, 2013 at 3:27 PM, Mark Wieder <[hidden email]> wrote:

> Roger-
>
> Thursday, October 3, 2013, 11:44:11 AM, you wrote:
>
> > Is that server configured for assynchronous communications?  <shameful>
>
> <groan>
>
> --
> -Mark Wieder
>  [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



--
Regards,

Andrew Kluthe
[hidden email]
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode