Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8497947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:16:10+00:00 2026-06-11T00:16:10+00:00

My situation is as follows: I use ubercart and I have 3 modules installed

  • 0

My situation is as follows:

I use ubercart and I have 3 modules installed for email (when a customer makes the purchase) confirmation of a purchase. The modules are: SMTP, MIMEMail and HTML MAIL.
Verifying, sending works with HTML.
However, I need to make another type of email, when a product expires.
And that I’m doing with my own module. However, when I use the function of drupal_mail or drupal_mail_send sending doesn’t correct.
When I debug the function apparently everything is correct, but I don’t get any email.

My code for the function is drupal_mail_send:

$message = array(
    'to' => $to,
    'from' => $from,
    'id' => 'cuponalcubo_mailing',
    'subject' => $subject,
    'body' => $body,
    'headers' => array(
        'MIME-Version' => '1.0',
        'Content-Type' => 'text/html; charset=UTF-8; format=flowed; delsp=yes',
        'Content-Transfer-Encoding' => '8Bit',
        'X-Mailer' => 'Pressflow',
    )
);
drupal_mail_send($message);

And the code for the function is drupal_mail:

function ....(){
$params = array(
        'subject' => $subject,
        'body' => t($body)
    );
    drupal_mail('email_deal_vp', 'email_deal_vp_html_mail', $to, language_default(), $params, $from);
}

/*
 * Implements HOOK_MAIL
 */
function email_deal_vp_mail($key, &$message, $params) {
    $language = $message['language'];
    switch ($key) {
        case 'email_deal_vp_html_mail':
            $message['subject'] = t($params['subject'], $var, $language->language);
              $body = "<html><body>
                  {$params['body']}
                  </body></html>";
              $message['body'][] = $body;
              $message['headers']['Content-Type'] = 'text/html; charset=UTF-8; format=flowed';
              break;
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:16:11+00:00Added an answer on June 11, 2026 at 12:16 am

    Maybe this is a problem with your server (SMTP is not configured properly). Check with any existing mail code whether it is working. (If it was working before.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a situation as follows <body> Test<br /> test<br /> test1<br /> </body>
Here is my situation, I have a string as follows 'a':1 'b':2 'c':3 I
Picture the following situation. I have an XML document as follows, <Form> <Control Type=Text
The current situation is as follows: We have an production .net 3.5 WCF service,
Here's the situation: We have some generic graphics code that we use for one
The situation is as follows: I have a ViewModel that has a property that's
The situation is as follows: I have a substantial number of tables, with each
My situation is as follows. I'm using entity framework (4.0) in which I have
I have the following situation: I set the beans (in applicationContext.xml) as follows: ...
I have written a web app in PHP which makes use of Ajax requests

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.