Hi there,

This morning I installed and enabled the latest dev versions of Mime Mail and Simplenews; when I try to send a test Newsletter to myself I get the following error...

Fatal error: Call to undefined function mimemail() in /clientdata/apache-www/s/p/mysite.com/www/sites/default/modules/simplenews/includes/simplenews.mail.inc on line 214

Any help or advice for this would be awesome, thanks.

Comments

miro_dietiker’s picture

Mimemail changed API. So we need to rewrite the interface.
#939208: Port Mime Mail module to D7

olax’s picture

I get the same error with using the latest versions of both Simplenews (7.x-1.x-dev [2011-Jan-28]) and Mime mail (7.x-1.x-dev [2011-Feb-07]).

sgabe’s picture

Title: Fatal error: Call to undefined function mimemail() » Support Mime Mail on Drupal 7
Status: Active » Needs work
StatusFileSize
new4.73 KB

I'm attaching a patch to give some hint on how to send messages with Mime Mail.

You can use only drupal_mail() to send messages with any mail system, you just need to tell Drupal which system to use for your message. You can do that by modifying the mail_system variable. In the attached patch I have implemented a very basic solution for this, just navigate to Administration » Configuration » Simplenews » Send mail.

miro_dietiker’s picture

Committed the code to stop the fatal errors as a first step straight away.

Let's think about the solution in a second iteration.

simon georges’s picture

Category: support » bug

It's actually not a support request ;-)

ksinc’s picture

subscribed

mcaden’s picture

sub

beatnikdude’s picture

sub

thomas bosviel’s picture

Subscribe

mstrelan’s picture

subscribe

ngstigator’s picture

subscribe

miro_dietiker’s picture

Priority: Normal » Major

Setting to major as it is a huge limitation.

Is someone working on this?

pluess’s picture

I thought about picking this up but I cannot find anything wrong. I just tried with the latest dev versions of simplenews and mimemail. Everything is working as expected. The HTML mails do get sent without any problems. Is there something that I'm missing?

simon georges’s picture

Well... Drupal core upgraded to 7.2, some bugs have been fixed on Simplenews 7.x-1.x, maybe on Mimemail's side as well ;-)

Can we have somebody else's feedback ?

miro_dietiker’s picture

At least we went through the html mail code that builds the mail and it seemed to me very ugly...

While it in general is great that we seem to support mimemail now (please someone confirm and close the issue), i still strongly vote for cleaning up the html building code... with a different issue. ;-)

We tried to add a new module that provides preview or analyzes the mail-to-be. We needed to duplicate a lot of code just to build the markup that will be in the mail under clean conditions... There might be other modules that trigger sending, do preview and other stuff. So this part of code should be separated and exposed as an API.

EDIT: referring to new issue
#1188488: rework sending code - build mail content api

philippejadin’s picture

I can confirm that html sending works (at least when sending test email) with latest simplenews and mimemail dev and drupal 7.2.

However, the subject of the email disappears in this situation :

- create a simplenews node with title "test"
- send a test email
-> email received with the correct title
- edit again the node, save it
- send a test email
-> email subject is blank.

I also posted this here : http://drupal.org/node/1133250

miro_dietiker’s picture

Status: Needs work » Fixed

OK. In general this task is complete then.
Remaining bugfixes please in separate issues.

Status: Fixed » Closed (fixed)

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

Patricia_W’s picture

I'm using Drupal 7.8, simplenews 7.x-1.0-alpha1, mimemail 7.x-1.x-dev, and mailsystem 7.x-2.30 and I cannot send mail in HTML format. I can't even see the option to do so which in the Drupal 6 version under eMail options
Is this code just fixed in the dev version?

Patricia_W’s picture

Status: Closed (fixed) » Active

I replaced the alpha version with the dev version and I still can't send HTML mail nor see email options

saturnino’s picture

I'm using Drupal 7.9, simplenews 7.x-1.0-dev, mimemail 7.x-1.x-dev, and mailsystem 7.x-2.30 and I cannot send mail in HTML format too.

saturnino’s picture

Ok it's work now.
I went to admin/config/system/mimemail
and i choose FULL HTML at E-mail format setting.

thinkdrupal’s picture

I'm using Drupal 7.8, simplenews 7.x-1.0-dev, mimemail 7.x-1.x-dev, and mailsystem 7.x-2.30 and I cannot send mail in HTML format. I have changed the setting for mimemail to FULL HTML at the email format settings. What am I missing? Everything comes as plan text.

thinkdrupal’s picture

Disregard...I figured it out. I had to configure 'HTML' format in a couple of places in simplenews

berdir’s picture

Status: Active » Closed (fixed)

Looks like this is just a configuration issue then and there is no bug that needs to be fixed.

Closing this issue. Please only re-open if you are *really* sure that there is something wrong with the current code and it's not your configuration. Otherwise, create a new support request here, in the forum or on Drupal Answers.

kalidasan’s picture

Category: bug » support
StatusFileSize
new18.73 KB

i'm using D7.16 , simplenews-7.x-1.0, mimemail-7.x-1.0-alpha2 . Getting the same problem as in #23.
When ever i send newsletter, it comes as plain text . Please find my attachment for reference .

sioux’s picture

I have a similar install- using Simplenews, Mimemail, Mailsystem with PHPmailer. I have MailSystem configured to use Mimemail for Site-wide Default, Mimemail, and Simplenews. Select the Theme to render the emails- I use a different admin theme so this is an important step. I selected the theme where my mimemail & simplenews tpl files have been copied. PHPMailer is configured, but 'use PHPmailer to send emails' is unchecked. Mimemail has 'Email format' as HTML, and 'Email engine' is PhPmailer. Go into the modules folders and copy the mimemail & simplenews tpl files into your theme folder. Set up a test newsletter and make sure the format is HTML. Send test newsletters to yourself and edit your mimemail & simplenews tpl files until you are satisfied with their appearance. I also use Elysia Cron to have more control over the sending out of the newsletters.

Patricia_W’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev

I am attempting to send mail via SMTP. I have sent test messages via SMTP and they go through. However when I attempt to send a test newsletter I alway get "SMTP error: Could not connect to host."
I'm using
MimeMail 7.x-1.0-alpha2
phpmailer 7.x-3.x-dev
simplenews 7.x-2.x-dev

I've also tested with HTMLMail etc. The newsletter sends OK with the standard mailer.

Clearly I am missing something but what?