Also, as noted at the end of this 
section<http://web2py.com/books/default/chapter/29/08#Using-the-template-system-to-generate-messages>,
 
if using the URL() function to generate links in emails, be sure to specify 
the scheme and host arguments in order to get absolute rather than relative 
URLs.

Anthony

On Tuesday, April 2, 2013 10:56:51 PM UTC-4, Anthony wrote:
>
> Yahoo Mail is re-writing the links. Probably not working correctly because 
> the URLs are missing the leading "http://"; so are treated as relative 
> links, which don't make sense in emails.
>
> Anthony
>
> On Tuesday, April 2, 2013 7:39:23 PM UTC-4, jjg0 wrote:
>>
>> I'm trying to send an email with html and links to pages. 
>>
>> Simple example of what I am doing:
>>
>>         testlink = 'www.yahoo.com' 
>>         email_body = "<html><body>Testing Emails with HTML<br><a 
>> href='%s' target='new'>first link test</a><br><a href='www.yahoo.com'>second 
>> link test</a></body></html>" % testlink
>>         mail.send(to=['myyah...@yahoo.com'],
>>           subject='testing links',
>>           message=email_body)
>>
>>
>> Details:
>> -There are two links, one using %s with testlink and one just using <a 
>> href='www.yahoo.com'> I am trying both ways just to play around with the 
>> emails and python, still new to a lot of this and learning.
>> -The mail is working, it sends to my yahoo account just fine
>> -I know I can get html emails in my yahoo account because I've gotten 
>> other working emails with html and links in them.
>> -I'm pretty sure the html part is working because I see the text 
>> correctly, the <br>'s are working, and the text to the links are underlined 
>> as if they are links, however they aren't actually links to anything.  
>> -I am using google app engine and my gmail account to send this email.
>>
>> To be clear, I get an email that looks like this:
>>
>> Testing Emails with HTML
>> first link test      <----------This is blue and underlined, but when I 
>> hover the mouse over it it is not actually a link
>> second link test <--------- This is blue and underlined, but when I hover 
>> the mouse over it it is not actually a link
>>
>> When I view the page source for these links I see something like this: 
>>
>> <a id="yui_3_7_2_1_1364943360317_3597" rel="nofollow">second link test</a>
>>
>>
>> How does this: 
>> <a href='www.yahoo.com'>second link test</a>
>>
>> get translated to this: 
>>
>> <a id="yui_3_7_2_1_1364943360317_3597" rel="nofollow">second link test</a>
>>
>> ??
>>
>>
>> I can't figure out why the links aren't showing up correctly. Is there 
>> something wrong with my code? Something I can't do with gae or yahoo? What 
>> am I doing wrong?
>>
>> Thanks
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to