Jump to content

Mysterious WireMail


tired_eyes
 Share

Recommended Posts

Hi,

there are some topics here and there mentioning WireMail. However, I can't find any traces of it in the API section nor in Modules. There are WireMail SMTP, WireMail Branding etc, but not WireMail itself. Is it a part of a publiс API or just a piece of  PW internals not intended for end users?

Link to comment
Share on other sites

WireMail is core and mails with the default PHP mail function,
WireMailSmtp and WireMailSwiftMailer extends WireMail, when installed one of these will be used as mailer.

WireMailBranding, is just a convenience Module that wraps markup around the HTML you want to send.

Here wireMail function binds to the MailObject. (That is why wireMail() is a function call)
https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/Functions.php#L797


Here's the WireMail class
https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/WireMail.php
 

Is it a part of a publiс API or just a piece of PW internals not intended for end users?


I don't understand this one :-) use what you need if it makes sense.

  • Like 2
Link to comment
Share on other sites

Sometimes a little bit of Googling can be helpful: https://processwire.com/talk/topic/5693-new-module-type-wiremail/. WireMail is a core class that provides support for sending email, and in template context you can access its features through the wireMail() function.

Native WireMail implementation is just an abstraction layer on top of PHP's native mail() function, but other WireMail modules provide different methods, such as SMTP support (which is a key part of both WireMailSwiftMailer and WireMailSMTP), or other features, like the WireMail Branding which wraps WireMail messages with custom markup.

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...