[asterisk-users] Asterisk to Email

sean darcy seandarcy2 at gmail.com
Sun Dec 6 12:54:11 CST 2009


On Sun, Dec 6, 2009 at 12:28 PM, Thomas Perron <thomas.perron at gmail.com> wrote:
> I am reading a lot of the material but need your input to help me
> understand what you mean.
>
> System(echo body of message | mail -s "subject line"
> ${the_caller_id}@tmobile.net)
>
> I understand the System application generally
> echo body of message .................?
> mail -s --------------what does this do please?
> "subject line" .................comes from where?
> ${the_caller_id}@tmobile.net) ............i understand this part.
>
> thank you
>
>
>
>
> On Sun, Dec 6, 2009 at 2:40 AM, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:
>> On Sat, Dec 05, 2009 at 08:25:33PM -0500, Thomas Perron wrote:
>>
>>> And, then send an email to the party.  Example....
>>>
>>> 3035551212 at tmobile.net
>>>
>>> Summary
>>> 1.  Capture the CID number.
>>> 2.  Prepend his number to his service provider SMTP address
>>> 3.  Email it to his phone
>>
>>
>> System(echo body of message | mail -s "subject line" ${the_caller_id}@tmobile.net)
>>
>> Note the usage of '|' here. IIRC it needs to be escaped on Asterisk
>> 1.4.x and below.
>>
>>>
>>> I assume I need to install SendMail and play around with CID stuff.
>>
>> Sendmail, postfix, exim, qmail - any program that provides a local
>> sendmail interface.
>>
>> I personally prefer postfix.
>>
>> --
>>               Tzafrir Cohen
>> icq#16849755              jabber:tzafrir.cohen at xorcom.com
>> +972-50-7952406           mailto:tzafrir.cohen at xorcom.com
>> http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir
>>
>> _______________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>

What everybody is trying to tell you is you need get this working from
the command line before you do it in asterisk.

The hardest part will probably be setting up your mail application. I
found postfix the easiest to set up, but YMMV. In any event you've got
to be able to use "mail" from the command line. Once you do that, then
try using it with System() in asterisk.

sean



More information about the asterisk-users mailing list