[Zope] Re: Hyperlink within email

Maik Jablonski maik.jablonski@uni-bielefeld.de
Tue, 28 Jan 2003 17:38:15 +0100


McDonnell, Larry wrote:
> Hi,
> 
> I just purchased the "Book of Zope" while at the Linux Expo in New York and
> I was trying to add a hyperlink within the Zope's sendmail. But all I see in
> the email is the text if the link. I tried the example but still no luck.
> Any help would be great, thanks in advance.
> 
> <dtml-call "REQUEST.set('originator', REQUEST.SESSION['originator'])">
> <dtml-call "REQUEST.set('capa_report_no',
> REQUEST.SESSION['capa_report_no'])">
> <dtml-let sender="'lmcdonnell@protonenergy.com'" >
> <dtml-sendmail mailhost="MailHost">
> To: <dtml-var sender>, 
> From: <dtml-var sender>
> Subject: Corrective Action Report Update <dtml-var capa_report_no>
> test message
> 
> <dtml-comment> The following is a test message</dtml-comment>   
> <h1>A Corrective Action Report-</h1> 
> <a
> href="http://prointranet:8080/corrective_action/view_capa_form2?capa_report_
> no=<dtml-var capa_report_no>" target="_blank">CAR<dtml-var
> capa_report_no></a> has been updated. Please review the report.
> <br><a href="http://prointranet:8080/corrective_action/index_html"
> target="_top">Go To Corrective Action Menu</a></br>
> </dtml-sendmail> 
> 
> </dtml-let>


Your problem has nothing to do with Zope at all... You'll want to send a 
HTML-Mail, but you send only a plain-text-mail.

You have to options:

  1) Be kind to your customers and stay on plain-mail-mode. Insert the 
hyperlinks as they are: Most email-clients will render them as hypertext 
automatically ... => http://www.zope.org

  2) If you want to insist on sending HTML-Mails (booo..;), add 
something like:

<dtml-sendmail mailhost="MailHost">
To: <dtml-var sender>,
From: <dtml-var sender>
Content-type: text/html
Subject: Corrective Action Report Update <dtml-var capa_report_no>

to your mail-header...

Cheers, Maik