Still doesnt work for me, so I will stick to my hackish way for now till I 
can look into it in more detail.

On Monday, September 24, 2012 2:58:17 AM UTC+1, howesc wrote:
>
> i remember this documented way to send HTML emails by sending a list of 
> messages, first item in the list is plaintext, second item is HTML.  
> http://web2py.com/books/default/chapter/29/08#Combining-text-and-HTML-emails
>
> actually, this is new to me, and apparently what you are using: 
> http://web2py.com/books/default/chapter/29/08#HTML-emails
>
> i would expect that you can use my response.render technique with the just 
> HTML version that you used.  i saw a note on another thread recently that 
> you must start your template with <html> (no spaces or newlines at the top) 
> to get it to work properly.
>
> let us know if you have further issues!
>
> cfh
>
> On Sunday, September 23, 2012 6:27:33 PM UTC-7, Pystar wrote:
>>
>> I havent tried your method, but I got it working in a rather hackish way 
>> using simple string interpolation.This is what I did
>>
>> message = "<html><body>Dear %user, welcome to my site</body></html>" % 
>> ("pystar")
>> mail.send(to="blabla", subject="blabla", message=message)
>>
>> That way, I can send HTML messages with inserted variables. But it would 
>> have been great if sending HTML emails worked out of the box
>>
>> On Monday, September 24, 2012 2:07:28 AM UTC+1, howesc wrote:
>>>
>>> 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 <nor...@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