summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/contact/contact.module16
-rw-r--r--modules/user/user.module2
2 files changed, 4 insertions, 14 deletions
diff --git a/modules/contact/contact.module b/modules/contact/contact.module
index dad3f3e08..39a0f54d0 100644
--- a/modules/contact/contact.module
+++ b/modules/contact/contact.module
@@ -370,11 +370,6 @@ function contact_mail_user_submit($form, &$form_state) {
$message[] = t('Message:');
$message[] = $form_state['values']['message'];
- // Tidy up the body:
- foreach ($message as $key => $value) {
- $message[$key] = wordwrap($value);
- }
-
// Prepare all fields:
$to = $account->mail;
$from = $user->mail;
@@ -383,7 +378,7 @@ function contact_mail_user_submit($form, &$form_state) {
$subject = '['. variable_get('site_name', 'Drupal') .'] '. $form_state['values']['subject'];
// Prepare the body:
- $body = implode("\n\n", $message);
+ $body = drupal_wrap_mail(implode("\n\n", $message));
// Send the e-mail:
drupal_mail('contact-user-mail', $to, $subject, $body, $from);
@@ -518,11 +513,6 @@ function contact_mail_page_submit($form, &$form_state) {
$message[] = t("!name sent a message using the contact form at !form.", array('!name' => $form_state['values']['name'], '!form' => url($_GET['q'], array('absolute' => TRUE))));
$message[] = $form_state['values']['message'];
- // Tidy up the body:
- foreach ($message as $key => $value) {
- $message[$key] = wordwrap($value);
- }
-
// Load the category information:
$contact = db_fetch_object(db_query("SELECT * FROM {contact} WHERE cid = %d", $form_state['values']['cid']));
@@ -530,7 +520,7 @@ function contact_mail_page_submit($form, &$form_state) {
$subject = t('[!category] !subject', array('!category' => $contact->category, '!subject' => $form_state['values']['subject']));
// Prepare the body:
- $body = implode("\n\n", $message);
+ $body = drupal_wrap_mail(implode("\n\n", $message));
// Send the e-mail to the recipients:
drupal_mail('contact-page-mail', $contact->recipients, $subject, $body, $from);
@@ -542,7 +532,7 @@ function contact_mail_page_submit($form, &$form_state) {
// Send an auto-reply if necessary:
if ($contact->reply) {
- drupal_mail('contact-page-autoreply', $from, $subject, wordwrap($contact->reply), $contact->recipients);
+ drupal_mail('contact-page-autoreply', $from, $subject, drupal_wrap_mail($contact->reply), $contact->recipients);
}
// Log the operation:
diff --git a/modules/user/user.module b/modules/user/user.module
index 7918f09c3..f9b5d69b5 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -3157,7 +3157,7 @@ function _user_mail_notify($op, $account, $password = NULL) {
$from = variable_get('site_mail', ini_get('sendmail_from'));
$variables = user_mail_tokens($account, $password);
$subject = _user_mail_text($op .'_subject', $variables);
- $body = _user_mail_text($op .'_body', $variables);
+ $body = drupal_wrap_mail(_user_mail_text($op .'_body', $variables));
$result = drupal_mail($mail_id, $account->mail, $subject, $body, $from);
if ($op == 'register_pending_approval') {
// If a user registered requiring admin approval, notify the admin, too.