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
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
Thanks eleyburn, that did the trick ;) .
#3
I've created a patch that makes this change and tested it - attaching here.
#4
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.
#5
Committed to HEAD, will roll a D5 release soon. Thanks!
#6
Automatically closed -- issue fixed for two weeks with no activity.