mailto: hrefs not composed correctly

patricio.keilty - July 24, 2007 - 23:48
Project:Mime Mail
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

This is a sample code to point out the issue, it just calls function mimemail() directly with some simple html code in the message body containing mailto: href,

<?php
mimemail
('user@example.com', 'user@example.com', 'this is a mimemail test',
'<p><a href="mailto:user@example.com?subject=testing+mimemail+hrefs">click over to send email</a></p>');
?>

in the resulting email this link does not work.
Using http: hrefs do work as expected: e.g.:

<?php
mimemail
('user@example.com', 'user@example.com', 'this is a mimemail test',
'<p><a href="http://www.example.com">click over to follow link</a></p>');
?>
.

#1

eleybourn - July 29, 2007 - 01:33
Version:4.7.x-1.x-dev» 5.x-1.x-dev

Line 404 in mimemail.inc
replace
return str_replace('mailto:', '', $url);
with
return $url;

I do not know why they strip the mailto: from the url. If there is a good reason please let me know.

#2

patricio.keilty - July 31, 2007 - 21:12

Thanks eleyburn, that did the trick ;) .

#3

jerdavis - February 17, 2008 - 00:26
Status:active» patch (reviewed & tested by the community)

I've created a patch that makes this change and tested it - attaching here.

AttachmentSize
mimemail_mailto.patch349 bytes

#4

jerdavis - February 17, 2008 - 02:24

Uploading an updates patch, this patch takes into account the "Code Cleanup" patch from: http://drupal.org/node/220432

This update requires that patch prior to being applied.

AttachmentSize
mimemail_mailto_update.patch348 bytes

#5

Allie Micka - February 18, 2008 - 00:45
Status:patch (reviewed & tested by the community)» fixed

Committed to HEAD, will roll a D5 release soon. Thanks!

#6

Anonymous (not verified) - March 3, 2008 - 00:52
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.