Jump to content
horst

WireMailSmtp

Recommended Posts

On 9/27/2020 at 1:31 AM, hellomoto said:

Is there a built-in way to handle incoming email?

This module is an SMTP extension for the WireMail class. It can only handle SMTP transport which is for outgoing mail.
There is no module that I know of which can handle incoming mail (IMAP, POP3).
If you want to handle incoming mail, you could use a service for transactional emails like mailgun (and the WireMailgun module) and use webhooks. But this still involves quite a lot of programming.

  • Thanks 1

Share this post


Link to post
Share on other sites
On 9/27/2020 at 2:31 AM, hellomoto said:

Is there a built-in way to handle incoming email?

33 minutes ago, gebeer said:

There is no module that I know of which can handle incoming mail (IMAP, POP3).
If you want to handle incoming mail, you could use a service for transactional emails like mailgun (and the WireMailgun module) and use webhooks. But this still involves quite a lot of programming.

Depending on your needs https://modules.processwire.com/modules/process-email-to-page/ may be worth looking into. I'm not particularly familiar with this module, mind you, so don't ask me how (or if) it works 😛

  • Like 1

Share this post


Link to post
Share on other sites

Thanks guys. I had known about that module and was going to maybe modify it to suit the use case but quit the project.

Share this post


Link to post
Share on other sites

WireMail SMTP, WireMailPHPMailer or SwiftMailer - which one is state of the art? Or any other? What are the pros and cons? I tried WireMail SMTP, it doesn't seem so reliable. Many people seem to be in favor of WireMailPHPMailer, but that needs some attention, but before I start, there's also SwiftMailer, so I don't know what's the best bet and which one's the newest.

Share this post


Link to post
Share on other sites
20 minutes ago, fruid said:

WireMail SMTP, WireMailPHPMailer or SwiftMailer - which one is state of the art? Or any other? What are the pros and cons? I tried WireMail SMTP, it doesn't seem so reliable. Many people seem to be in favor of WireMailPHPMailer, but that needs some attention, but before I start, there's also SwiftMailer, so I don't know what's the best bet and which one's the newest.

The following are a few links for you to check out:

Wiremail

Wiremail Class:

https://processwire.com/api/ref/wire-mail/

 

Wiremail Related Modules

https://processwire.com/modules/category/email/

 

 

  • Like 2

Share this post


Link to post
Share on other sites

PHP 8 was released a few months ago. I can't get WireMailSMTP to work with PHP 8. The error message is: "Error in hnsmtp::send : cannot connect to smtp-server!"

With PHP 7.4, on the other hand, it works fine. Was anyone already successful with PHP 8?
Thanks in advance.

  • Like 2

Share this post


Link to post
Share on other sites

Hi @titanium, I don't have had time to install PHP 8 and test out all my sites and modules under it. I will do so with priority for WireMailSmtp. But it may take 1 or 2 weeks, sorry.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

I have an issue where some emails are lacking the replyto email-address though I set it in the code as follows…

	$mail->sendSingle(true);
    $mail->subject($subject);
    $mail->body($message);
    $mail->replyto($email);

So that's bad because, needless to say, cannot reply to the email. The log clearly show the email address in the array [replyTo] => yada@example.com

Any ideas how that can happen? I mean why how... Is that just an email client configuration?

EDIT: never mind, pretty sure it's an email client issue

Share this post


Link to post
Share on other sites

Hey all, hey @horst,

I've strange behaviour and don't know where to debug: Following problem: The settings I'm using seems to be correct a test message is sent and I can receive it, but the Debug Log is orange and I can't submit any forms via FormBuilder.

 Unable to verify successful email delivery of this form submission.

 

Any ideas? Many greets!

EDIT: Found the problem, it was sitting right in front of the computer 😬

damn.gif.0801566cef69374baea9081df831fd6d.gif

Forgot to edit the FormBuilder settings, therefore no mails where sent out.  @horst and all others - sorry for being annoying!

Share this post


Link to post
Share on other sites
On 3/2/2021 at 10:02 PM, titanium said:

PHP 8 was released a few months ago. I can't get WireMailSMTP to work with PHP 8. The error message is: "Error in hnsmtp::send : cannot connect to smtp-server!"

With PHP 7.4, on the other hand, it works fine. Was anyone already successful with PHP 8?
Thanks in advance.

Finally I got my local setup switched today. PHP 8 which needed a new apache version too, and then SSL needs to be updated, etc., etc., ...
Now I need to upgrade my IDE for PHP 8 support too. 🙂

After all I could debug and correct the WireMail-SMTP module: https://github.com/horst-n/WireMailSmtp

  • Like 3

Share this post


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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By robert
      I often had the need for an overview of all used fields and their contents for a specific page/template while developing new websites without switching to the backend, so I made a small module which lists all the needed information in a readable manner (at least for me):
      Debug Page Fields
      https://github.com/robertweiss/ProcessDebugPageFields
      It adds two new properties to all pages:
      $page->debugFieldValues – returns an object with all (sub-)fields, their labels, fieldtypes and values $page->debugFieldTypes – returns an object with all fieldtypes and their corresponding fields // List all values of a pages $page->debugFieldValues // List a specific field $page->debugFieldValues->fieldname // List all used fieldtypes of a page $page->debugFieldTypes I recommend using it in combination with Tracy Debugger, Ray, Xdebug etc. as it returns an object and is only meant for developing/debugging uses. 
      For now, the fieldtype support includes mostly fieldtypes I use in my projects, but can easily be extended by adding a new FieldtypeFIELDNAME method to the module. I use it with five different client installations (all PW 3.0.*), but of course there might be some (or more) field configurations which are not covered correctly yet.
      Supported fieldtypes
      Button Checkbox Color Combo Datetime Email FieldsetPage * File FontIconPicker Functional Image ImageReference MapMarker Multiplier Mystique Options Page PageIDs PageTitle Radio Repeater * RepeaterMatrix * RockAwesome SeoMaestro Table Text Textarea Textareas Toggle URL * The fields with complete subfield-support also list their corresponding subfields.
      Installation
      Download the zip file at Github or clone the repo into your site/modules directory. If you downloaded the zip file, extract it in your sites/modules directory. In your admin, go to Modules > Refresh, then Modules > New, then click on the Install button for this module. As this is my first ›public‹ module, I hope I did not miss any important things to mention here.
    • By Cybermano
      Food Allergens Module
      A simple List of Food Allergens
      My needs were to provide a simple list of food allergens for our clients with restaurant related activity.
      The idea was to simply output the list (to speed up the data entry) without leaving the food menu editing, eg. opening another page in new tab or window.
      This isn't a perfect solution, but it works fine for my needs and I decided to share the base idea.
      This could also be easily used to show little notes or short "vademecum", not only for the list of food allergens.
      ---
      Main features
      The basis
      All moves from a short editing of the module in this tutorial: How to create custom admin pages by @bernhard
      First of all it creates an empty admin page, with a dedicated permission to let safe-user to see it (this permission has to be created as a new ones, manually or by the module).
      Once the page is created, I have hooked its behaviour into the ready.php, to show the content (basically a list).
      A step further
      With the tips of  @bernhard, @Soma (and many others), see here , the magic happens. 
      The new page will be shown as a panel, so editors will not abandon their data entry to have a quick view to the list.
      A little further
      Why scroll to the top of the page to click a link?
      The next step was to create a sticky button only in the food menu pages.
      Again with a @bernhard tip I moved into the customization of this simple module and the related hook.
      ---
      How to use this module
      After installed, it creates the page /admin/page/allergens/ and the module is to be setted up. The first field is a CKEditor with multi-language. This is the place where to write the informations that will be shown into the page. The next field is a simply text-area where to place a bit of JS that will be appended to the markup of the text (omit the 'script' tags). I also putted a checkbox with a silly statement: this to think at least twice on the safety of the written JS. Now comes the first way to display the link to the page
      Field Note with Link. Enable and save it. The module will display a new row with 4 selects (1 standard and 3 ASM):
      View mode (to show the page as Panel or as Modal PopUp); Templates to select: select one or more and save before proceed, so the  asm-select of the pages will be populated showing all the pages of the selected templates. Pages to select: also here select at least one and save before proceed to populate the asm-select for fields only with the ones that belong to the selected pages. Select the fields where to place the note and save again. That's all: now you will find into the notes of the selected fields the link "See the List of Allergens".
      At the same way, the option for the sticky button, but with a plus
      The field select is obviously unnecessary, but you could play with the last row: the inline styles to fix your sticky button where you like. Here you could set the sticky position of the <div> and the absolute ones of the <a>.

      Video Explanation
      In these screencasts you could see a custom JS that show a "copy" button near a "hanna-code" call.
      This because I've set a specific one for each allergen to show up a tooltip in the front end.

      Registrazione #33.mp4  

      Registrazione #34.mp4 ---
      Last but not the least
      Actually it works fine for my needs, even if it's much improvable: I'm working on the permissions creation, the uninstall section, a separate configs and defaults and how to include the hook into the module leaving free the ready.php. According to a simpler uninstall. Also I would make the link text as a dynamic text field, so it will be more flexible.
      I always learn a lot here, so I would share my code for whom it could be interested.
      I removed the hanna code references, but I provide you the html list of the allergens, English and Italian too, so you can paste them into the "source" of the CKEditor field to have a ready to use module.
      Obviously you are free to modify the code as per your needs.
      Please, keep in mind that I'm not a pro coder and I beg your pardon for my verbosity (speaking and coding). 😉
      I hope be helpful or for inspiration.
      Bye
      ready.phpList-ITA.htmlList-ENG.htmlAllergens.module
      README.md
    • By Robin S
      This module is sort of an upgrade to my earlier ImageToMarkdown module, and might be useful to anyone working with Markdown in ProcessWire.
      Copy Markdown
      Adds icons to images and files that allow you to copy a Markdown string to the clipboard. When you click the icon a message at the top left of the screen notifies you that the copying has occurred.
      Screencast

      Note: in the screencast an EasyMDE inputfield is used to preview the Markdown. It's not required to use EasyMDE - an ordinary textarea field could be used.
      Usage: Images
      When you hover on an item in an Images field an asterisk icon appears on the thumbnail. Click the icon to copy an image Markdown string to clipboard. If the "Description" field is populated it is used as the alt text.
      You can also open the "Variations" modal for an image and click the asterisk icon to copy an image Markdown string for an individual variation.
      Usage: Files
      When you hover on an item in a Files field an asterisk icon appears next to the filename. Click the icon to copy a link Markdown string to the clipboard. If the "Description" field is populated it is used as the link text, otherwise the filename is used.
       
      https://github.com/Toutouwai/CopyMarkdown
      https://processwire.com/modules/copy-markdown/
    • By BitPoet
      I've realized that I've been jumping back and forth between the PW API docs and the source code for site modules far too much. The idea to hold all necessary documentation locally in one place has occurred to me before, but getting PHPDocumentor et al set up and running reliably (and producing readable output) as always been too much of a hassle. Today I was asked how I find the right hooks and their arguments, and that inspired me to finally get my backside down on the chair and whip something up, namely the
      Module Api Doc Viewer
      ProcessModuleApiDoc
      It lets you browse the inline documentation and public (optionally also protected) class/method/property information for all modules, core classes and template files in the ProcessWire instance. The documentation is generated on the fly, so you don't have to remember to update your docs whenever you update a module.
      The module is quite fresh, so expect some bugs there. Behind the scenes it uses PHP-Parser together with a custom class that extracts the information I needed, and the core TextformatterMarkdownExtra module for rendering the description part in the phpdoc style comments.
      This is not a replacement / competitor to the API Viewer included in the commercial ProDevTools package. There is quite some information included in the inline documentation that my module can't (and won't) parse, but which makes up parts of the official ProcessWire API docs.
      This, instead, is a kind of Swiss army knife to view PHPDoc style information and get a quick class or function reference.
      If you feel daring and want to give it a spin, or if you just want to read a bit more, visit the module's GitHub repository.
      This is the overview page under "Setup" -> "Module API Docs":

      And this is what the documentation for an individual class looks like:

      The core module documentation can of course be found online, but it didn't make sense not to include them.
      Let me know what you think!

    • By tcnet
      File Manager for ProcessWire is a module to manager files and folders from the CMS backend. It supports creating, deleting, renaming, packing, unpacking, uploading, downloading and editing of files and folders. The integrated code editor ACE supports highlighting of all common programming languages.
      https://github.com/techcnet/ProcessFileManager

      Warning
      This module is probably the most powerful module. You might destroy your processwire installation if you don't exactly know what you doing. Be careful and use it at your own risk!
      ACE code editor
      This module uses ACE code editor available from: https://github.com/ajaxorg/ace

      Dragscroll
      This module uses the JavaScript dragscroll available from: http://github.com/asvd/dragscroll. Dragscroll adds the ability to drag the table horizontally with the mouse pointer.
      PHP File Manager
      This module uses a modified version of PHP File Manager available from: https://github.com/alexantr/filemanager
       
×
×
  • Create New...