here is what i do...

    def connect_mail():
      """
      init the mail module
      """
      mail = Mail()                                  # mailer
      mail.settings.server = 'gae'  # your SMTP server
      mail.settings.sender='authorized sender <nore...@adomain.com>' # your 
email
      return mail


    text_message = response.render('email/order_conf.txt',
                                   retval)
    html_message = response.render('email/order_conf.html',
                                   retval)


    logging.info(database.connect_mail().send(to=retval['customer'].email,

                 subject="Online Order Confirmation - [%s]"%thisorder.id,
                 message=(text_message, html_message),
                 bcc=site_setting.get_site_settings_dict().setdefault(
                     'order_email_bcc','no...@noone.com').split(',')))




that sends email with plaintext and html formatted content, with a bcc.

cfh


On Sunday, September 23, 2012 5:23:16 PM UTC-7, Pystar wrote:
>
> Is there a work around, I really need to send HTML emails or how can I 
> include a clickable link inside a text email on GAE?
>
> On Monday, September 24, 2012 1:17:26 AM UTC+1, Massimo Di Pierro wrote:
>>
>> I am not sure GAE supports HTML messages. Does it?
>>
>> On Sunday, 23 September 2012 19:13:20 UTC-5, Pystar wrote:
>>>
>>> The thing is that I can send ordinary text messages, but sending html 
>>> messages fails.
>>>
>>> On Monday, September 24, 2012 12:52:42 AM UTC+1, howesc wrote:
>>>>
>>>> did you check the GAE logs?  remember that GAE won't send emails unless 
>>>> the from address is at least a viewer of the GAE application.
>>>>
>>>> please double check the GAE logs for warning messages....i think that 
>>>> is how google logs them.
>>>>
>>>> cfh
>>>>
>>>> On Sunday, September 23, 2012 3:35:16 PM UTC-7, Pystar wrote:
>>>>>
>>>>> These are the settings:
>>>>> auth.settings.register_onaccept = [messenger]
>>>>>
>>>>> mail=auth.settings.mailer
>>>>> mail.settings.server = 'gae'
>>>>> mail.settings.sender = 'user...@gmail.com'
>>>>> mail.settings.login = 'username:password'
>>>>>
>>>>> def messenger(form):
>>>>>     context = dict(uniqueid=form.vars.uniqueid, 
>>>>> first_name=form.vars.first_name)
>>>>>     message = response.render("message.html", context)
>>>>>     mail.send(to=form.vars.email, subject="welcome to ICOP NIGERIA!", 
>>>>> message=[None, message])
>>>>>
>>>>> The surprising thing is that it works perfectly on localhost but fails 
>>>>> silently on GAE.
>>>>> I need help, its URGENT.
>>>>>
>>>>> On Sunday, September 23, 2012 10:41:45 PM UTC+1, Massimo Di Pierro 
>>>>> wrote:
>>>>>>
>>>>>> Do you get an error?
>>>>>>
>>>>>> On Sunday, 23 September 2012 16:10:35 UTC-5, Pystar wrote:
>>>>>>>
>>>>>>> sending emails on gae doesnt work although it works perfectly on 
>>>>>>> localhost.
>>>>>>> I am using "gae" as settings
>>>>>>>
>>>>>>

-- 



Reply via email to