Hi, I'm looking for a simple way to send email from a dial plan. I have searched around quite a bit looking for a solution for this and I'm surprised that I haven't found anything useful yet other than using the System() application. I would like to be able to change the subject dynamically based on ${EXTEN} and the body is not important. I was hoping to have a one line command from the System() application without having to write a script or any other dependency. Has anyone implemented anything like this? Thanks, Damien
mailx?> -----Original Message----- > From: Damien Gabrielson [mailto:damien.gabrielson@mdci.ca] > Sent: Thursday, August 17, 2006 4:11 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: [asterisk-users] Sending Email From A Dial Plan > > > Hi, > > I'm looking for a simple way to send email from a dial plan. I have > searched around quite a bit looking for a solution for this and I'm > surprised that I haven't found anything useful yet other than > using the > System() application. I would like to be able to change the subject > dynamically based on ${EXTEN} and the body is not important. I was > hoping to have a one line command from the System() > application without > having to write a script or any other dependency. Has anyone > implemented > anything like this? > > Thanks, > Damien > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Damien Gabrielson wrote:> Hi, > > I'm looking for a simple way to send email from a dial plan. I have > searched around quite a bit looking for a solution for this and I'm > surprised that I haven't found anything useful yet other than using the > System() application. I would like to be able to change the subject > dynamically based on ${EXTEN} and the body is not important. I was > hoping to have a one line command from the System() application without > having to write a script or any other dependency. Has anyone implemented > anything like this?How about System(echo "message text" | mail -s ${EXTEN} mail@domain.com) ? Why is it a problem to use the system command? You can set the subject in dependence of ${EXTEN}!> > Thanks, > Damien > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Instead of SYSTEM(), you could use an AGI possibly. Cheers, SKM -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Damien Gabrielson Sent: Thursday, August 17, 2006 6:11 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Sending Email From A Dial Plan Hi, I'm looking for a simple way to send email from a dial plan. I have searched around quite a bit looking for a solution for this and I'm surprised that I haven't found anything useful yet other than using the System() application. I would like to be able to change the subject dynamically based on ${EXTEN} and the body is not important. I was hoping to have a one line command from the System() application without having to write a script or any other dependency. Has anyone implemented anything like this? Thanks, Damien _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Eric "ManxPower" Wieling
2006-Aug-17 18:41 UTC
[asterisk-users] Sending Email From A Dial Plan
Untested: exten => _XXXX,1,System(/bin/mail -s \"Happy Message: ${EXTEN}\" nimda@happyplace.com) This assumes you can send mail outside of Asterisk from that host. Damien Gabrielson wrote:> I'm looking for a simple way to send email from a dial plan. I have > searched around quite a bit looking for a solution for this and I'm > surprised that I haven't found anything useful yet other than using > the System() application. I would like to be able to change the > subject dynamically based on ${EXTEN} and the body is not important. I > was hoping to have a one line command from the System() application > without having to write a script or any other dependency. Has anyone > implemented anything like this?
On Thu, Aug 17, 2006 at 08:41:18PM -0500, Eric ManxPower Wieling wrote:> Untested: > > exten => _XXXX,1,System(/bin/mail -s \"Happy Message: ${EXTEN}\" > nimda@happyplace.com)Hmmm... is the standard input on System() set to /dev/null? -- Tzafrir Cohen sip:tzafrir@local.xorcom.com icq#16849755 iax:tzafrir@local.xorcom.com +972-50-7952406 jabber:tzafrir@jabber.org tzafrir.cohen@xorcom.com http://www.xorcom.com