Problem/Motivation

Following the instructions at the Documentation page we are asked to "Import Configuration" using the GUI (or drush) before disabling Swiftmailer. But "There is no config to import" and we can see no way of navigating to the Swiftmailer config.

Steps to reproduce

We followed the instruction by requiring drupal/symfony, first the alpha version, then, after failure, the dev version.

We went to /admin/config/system/mailer/import as instructed but were presented with the text under empty list headed "Name, State, Warning, Operations" saying "There is no config to import"

CommentFileSizeAuthor
#2 symfony_mailer.swiftmailer.3276709-2.patch582 bytesadamps

Comments

iainH created an issue. See original summary.

adamps’s picture

Status: Active » Needs review
StatusFileSize
new582 bytes

Thanks for the report. I think this patch should fix it (not tested myself as I would have to wipe my test server and reinstall swiftmailer😃) - please can you test?

iainh’s picture

Will do Adam.
As soon as I’ve set up a separate VM for this project.

  • AdamPS committed 8bdd0fa on 1.x
    Issue #3276709 by AdamPS, iainH: Unable to locate Swiftmailer...
adamps’s picture

Status: Needs review » Fixed

Thanks. I'm fairly sure the fix is good so I've committed it. That means you can test the dev release which hopefully is easier.

iainh’s picture

That seems to do it, Adam. So far so good: swiftmailer configuration seems to have been successfully imported.

We were able to send a test simplenews message via sendmail.

However, unless we are to completely re-jig our development setup, we need symfony mailer to respect the sendmail_path setting in our php.ini file.

Right now it would appear that SM disregards what we have set there (/opt/mailhog/mhsendmail) and overwrites it with a sendmail path of its own.

You mentioned previously that SM treats sendmail as a "black box" but apparently this is SM's black box and not ours which routes messages to mailhog.

What do I need to do to configure the sendmail_path that symfony mailer uses?

iainh’s picture

OK so to use a custom sendmail binary we need to use the Native transport.

iainh’s picture

The answer to using mailhog is to choose the Mailer SMTP Transport with a Host Name of 127.0.0.1 and Port 1025

Messages get sent to mailhog.

The Native Transport does not work with Symphony Mailer.

adamps’s picture

Thank @iainH for testing and further investigation.

OK so to use a custom sendmail binary we need to use the Native transport.

That sounds right to me.

The Native Transport does not work with Symphony Mailer.

If true that would be a bug - either with this module or with the symfony mailer library. I suggest this deserves a separate issue to discuss it. It would be useful to describe exactly what you tried, and what you saw.

In your case you found an alternative to use the SMTP transport. However this won't necessarily work for everyone so it would be helpful to figure this one out.

iainh’s picture

Created new issue here

Status: Fixed » Closed (fixed)

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