Jump to content
Sign in to follow this  
tired_eyes

Mysterious WireMail

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?

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Mithlesh
      Hi there,
      My form is not getting submitted, it is showing:
      Unable to verify successful email delivery of this form submission.
      Attaching for your reference as well: 

      In the Backend, it is showing Connection timed out with smtp.gmail.com
      Pl guide me how to resolve that
    • By abdulqayyum
      hello processwire community,
      i am using LoginRegister module for front-end user registration. i am facing an issue verification email not receiving while WireMailSmtp is working perfectly and user receives message
      "Thank you, a confirmation code has been emailed to you. When you receive the email, click the link it contains, or paste the confirmation code below."
      received this message in front-end but does not receive any email relevant it.
      please help me in this case how i can solve it.
      Please check screen shots for SMTP test and message which receives user.
      Thanks AbdulQayyum,

      First screenshot SMTP test message, second when user receives message after clicking register button.
    • By louisstephens
      I have been using the wiresmtpmail module in a few installs for sending out automated emails etc etc, and it works flawlessly. However, I now need to send an email when a user submits a form, and for the life of me I can not figure out how to get the form to submit.
      if(isset($_POST['Submit'])) { $mail = wireMail(); // calling an empty wireMail() returns a wireMail object $toName = $sanitizer->text($input->post->fullname); $toEmail = $sanitizer->email($input->post->email); $phone = $sanitizer->text($input->post->phone); $comments = $sanitizer->text($input->post->comments); $subject = $page->store_name . $page->title; $numSent = wireMail($toName, '', $subject, $textBody, $options); } If I remove the if statement, the form submits just fine, however you can just refresh the page (without adding anything to the fields), and it will submit a blank email every refresh. Has anyone gotten this working with a submit button?
    • By dragan
      I'm suddently getting this error message whenever I want to edit a page:
      Error: Class 'ProcessWire\WireMail' not found (line 58 of /home/somedir/www/foo/wire/core/WireMailTools.php)
      It results in server error 500.
      I'm certainly never touching anything in the wire folder, the WireMail files are all there.
      Has anybody an idea what causes this? I'm practically blocked.
    • By louisstephens
      I believe I have hit a roadblock on this one. I am trying to pass an array to a "cc" in wiremail (using wiremailsmpt to extend). Everything else is working, but I am getting an "invalid email address" for $cc_recipient[0]. I looked in wiremail, and it is checking to see if it is a valid email address before sending (which my variable is not). Is there a way around this by chance?
×
×
  • Create New...