Contents
Letterman
Add publisher for sending and editing emails at the front end
In /components/com_letterman/letterman.php, change
// Editor usertype check $letterman_rights['is_editor'] = $is_editor = (strtolower($my->usertype) == 'editor' || strtolower($my->usertype) == 'administrator' || strtolower($my->usertype) == 'super administrator' ); // Sender usertype check $letterman_rights['is_sender'] = (strtolower($my->usertype) == 'manager' || strtolower($my->usertype) == 'administrator' || strtolower($my->usertype) == 'super administrator' );
to
// Editor usertype check $letterman_rights['is_editor'] = $is_editor = (strtolower($my->usertype) == 'publisher' || strtolower($my->usertype) == 'editor' || strtolower($my->usertype) == 'administrator' || strtolower($my->usertype) == 'super administrator' ); // Sender usertype check $letterman_rights['is_sender'] = (strtolower($my->usertype) == 'publisher' || strtolower($my->usertype) == 'manager' || strtolower($my->usertype) == 'administrator' || strtolower($my->usertype) == 'super administrator' );
Improvement when there is no [NAME] tag
In /...istrator/components/com_letterman/letterman.xml, add to the parameters:
<param name="mail_from" type="text" default="" label="Mail from:" /> <param name="reply_to" type="text" default="" label="Reply to:" /> <param name="mail_to" type="text" default="" label="Mail to:" description="when sending a mail without the [NAME] tag in it, one email will be sent to this address, otherwise the site owner, all other recepients are BCC" />
In /...mponents/com_letterman/admin.letterman.html.php, from line 305 to 312:
<tr> <td style="text-align:right;"><strong><?php echo LM_MAIL_FROM ?>:</strong></td> <td><input class="inputbox" type="text" name="mailfrom" size="25" value="<?php echo $admin_email; ?>" style="width:200px" /></td> </tr> <tr> <td style="text-align:right;"><strong><?php echo LM_REPLY_TO ?>:</strong></td> <td><input class="inputbox" type="text" name="replyto" size="25" value="<?php echo $admin_email; ?>" style="width:200px" /></td> </tr>
change to:
<tr> <td style="text-align:right;"><strong><?php echo LM_MAIL_FROM ?>:</strong></td> <td><input class="inputbox" type="text" name="mailfrom" size="25" value="<?php echo $lm_params->get( 'mail_from', $admin_email ); ?>" style="width:200px" /></td> </tr> <tr> <td style="text-align:right;"><strong><?php echo LM_REPLY_TO ?>:</strong></td> <td><input class="inputbox" type="text" name="replyto" size="25" value="<?php echo $lm_params->get( 'reply_to', $admin_email );; ?>" style="width:200px" /></td> </tr> <tr> <td style="text-align:right;"><strong>TO (when no [NAME] tag in message):</strong></td> <td><input class="inputbox" type="text" name="mailto" size="25" value="<?php echo $lm_params->get( 'mail_to', $admin_email );; ?>" style="width:200px" /></td> </tr>
- In /components/com_letterman/letterman.html.php aournd line 265-272, do the same.
In /...or/components/com_letterman/admin.letterman.php, in function sendMail(), around line 637, replace
$mymail->AddAddress( $mailfrom, LM_SUBSCRIBER.'@'.$pagedata['host'] );
with
$mailto = mosGetParam( $_POST, "mailto" ); $mailto = $mailto ? $mailto : $mailfrom; $mymail->AddAddress( $mailto, LM_SUBSCRIBER.'@'.$pagedata['host'] );
- In /components/com_letterman/letterman.php, around line 805, do the same.
Relative URL
Using WYSIWYG editor (tinyMCE), the urls refering to the local documents are cut into relative url. It is no problem on the web, but when sent as an email, these urls do not refer correctly to the web site. solution:
file: components/com_letterman/letterman.php, after line 620 add:
<base href=\"$mosConfig_live_site\">
file: administrator / components / com_letterman / admin.letterman.php, after line 451, add the same.
exclamation mark in emails
Problem: when use phpmail or sendmailfor letterman to deliver mails, The issue is that actually most of these add a ! in the message evan do this is not in the actual message that is written.
Check out: experts-exchange, it has something to do with sendmail.
file: components/com_letterman/letterman.php, around line 630, before or after the line
$html_message = str_replace( "../../..", $mosConfig_live_site, $html_message );
insert:
$html_message= wordwrap($html_message, 72);
file: administrator / components / com_letterman / admin.letterman.php, around line 462, before or after the line
$html_message = str_replace( "../../..", $mosConfig_live_site, $html_message );
insert:
$html_message= wordwrap($html_message, 72);