horst

WireMailSmtp

Recommended Posts

It could be. You'd normally get an error/warning saying function is already defined, though.

Share this post


Link to post
Share on other sites

I guess the different case may have allowed it to sneak through - I can confirm I'm not seeing the issue now that I've renamed my function.

I'll follow up if the issue remains resolved.

Thanks for your help!

Share this post


Link to post
Share on other sites

I upgraded to version 0.2.6 today and cannot make use of the module.  It seems to not save the SMTP Password anymore.  I can send additional SMTP Configuration information via PM, if necessary.  Once I reverted back to version 0.2.5 everything worked as before.

Share this post


Link to post
Share on other sites
3 minutes ago, cstevensjr said:

I upgraded to version 0.2.6 today and cannot make use of the module.  It seems to not save the SMTP Password anymore.  I can send additional SMTP Configuration information via PM, if necessary.  Once I reverted back to version 0.2.5 everything worked as before.

Shit, my bad, sent another PR

https://github.com/horst-n/WireMailSmtp/pull/10

  • Like 1

Share this post


Link to post
Share on other sites
Just now, abdus said:

Shit, my bad, sent another PR


smtp_password

@abdus please update the version too in your PR. Thanks.

  • Like 1

Share this post


Link to post
Share on other sites
2 minutes ago, horst said:

please update the version too in your PR. Thanks.

Done.

image.png.587d5632ff34a4966836d89694253ef1.png

  • Like 2

Share this post


Link to post
Share on other sites

Done too!

Its updated to 0.2.7. All in all we only used 7 minutes to react on Charles issue report! Cool! :)

 

  • Like 6

Share this post


Link to post
Share on other sites
2 hours ago, horst said:

Done too!

Its updated to 0.2.7. All in all we only used 7 minutes to react on Charles issue report! Cool! :)

 

Thanks all (@abdus and  @horst) for the quick response.  I'd be lost without this module, I use it on every site.  Also thanks to @ryan for having the feature of saving the previous version of each module when using his Upgrade module. 

  • Like 2

Share this post


Link to post
Share on other sites

I try to connect to our SMTP server, which has no authentification, default port 25, but when I test the Settings I get the following error

  •  server does not require authentication

Share this post


Link to post
Share on other sites

Hi @dreerr, sorry, this is a known limitation: The test is only functional for connections with authentication.

But regardless of the failing test in this case, it should be possible to send mails without authentication. Hvae you tried it? Does it work?

Share this post


Link to post
Share on other sites

In the log files I get the error when trying to send a mail:

 
Error in hnsmtp::send : cannot connect to smtp-server!

Share this post


Link to post
Share on other sites

Hi, I am trying to implement wireMail attachment method into my form. I started a thread in the 'getting started' area but maybe this is the better place for it since it is specifically about wireMail. Basically I just want someone to be able to add an image to a form, then send it in an email. 

The field in my form is:

    <input type="file" name="user_image" />

I've been looking at this thread and trying to cobble something together. I am very new to php. I know this is wrong but this is as far as I can make out what I'm supposed to do:

$user_image = 'user_image->$filename';
$mail = wireMail();
$mail->attachment($filename);
$mail->send(); 

Any links to any other forum threads, or php info, would be greatly appreciated. I've been trying to figure this out for two days. The documentation at

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

is nice and simple but too simple for where my understanding is at. Thanks!

Share this post


Link to post
Share on other sites
20 hours ago, ryanC said:

$user_image = 'user_image->$filename';
$mail = wireMail();
$mail->attachment($filename);
$mail->send(); 

 

There seems to be a little quirks with the different parts.

First, a user will submit a from with a filefield. You need to check if there was sent a file, and if yes, get the file from this field. Do you use the GET or POST method with your form submit? Please refer to the PW vars $input->post->{...FIELDNAME...} or $input->get->{...FIELDNAME...}.

Once you have your file / filename, you can attach it to the wiremail object.

To check your process step by step, you may write some little prooflines into your script, like:

$filename = $input->post->.... ; // get the file / filename from your form submission

// now debug / check, if all went good for this step
var_dump(is_file($filename));  // also possible PHP functions: is_readable($filename)
die('DEBUG BREAK AT: ' . __FILE__ . ':' . __LINE__);

If this is true, you can delete this debug lines from your script and sent the email with attachment to a testaccount first. :)

  • Like 1

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 flydev
      PulsewayPush
      Send "push" from ProcessWire to Pulseway.
       
      Description
      PulsewayPush simply send a push to a Pulseway instance. If you are using this module, you probably installed Pulseway on your mobile device: you will receive notification on your mobile.
      To get more information about Pulseway, please visit their website.
      Note
      They have a free plan which include 10 notifications (push) each day.
       
      Usage
      Install the PulsewayPush module.
      Then call the module where you like in your module/template code :
      <?php $modules->get("PulsewayPush")->push("The title", "The notification message.", "elevated"); ?>  
      Hookable function
      ___push() ___notify() (the two function do the same thing)
       
      Download
      Github:  https://github.com/flydev-fr/PulsewayPush Modules Directory: https://modules.processwire.com/modules/pulseway-push/  
      Examples of use case
      I needed for our work a system which send notification to mobile device in case of a client request immediate support. Pulseway was choosen because it is already used to monitor our infrastructure.
      An idea, you could use the free plan to monitor your blog or website regarding the number of failed logins attempts (hooking Login/Register?), the automated tool then block the attacker's IP with firewall rules and send you a notification.
       

       
      - - - - - - - - - - - - - -
      11-22-2017: added the module to the modules directory
       
    • By netcarver
      Part 1 of a 2 part Module & Service Reveal.
      I'm currently working on a new module: ModuleReleaseNotes that was inspired by the work I originally did on making Ryan's ProcessWireUpgrades module "release" aware. In the end, I decided to ditch the approach I was originally taking and instead work on a module that hooked in to the UpgradeConfirmation dialog and the module edit page.
      Aims
      My aims for this module are as follows...
      Make discovery of a module's changes prior to an upgrade a trivial task. Make breaking changes very obvious. Make reading of a module's support documentation post-install a trivial task. Make module authors start to think about how they can improve the change discovery process for their modules. Make sure the display of information from the module support files/commit messages doesn't introduce a vulnerability. Looking at these in turn...
      Making discovery of a module's changes prior to upgrade a trivial task.
      This is done by adding a "What's changed section" to the upgrade confirmation dialog.  This section takes a best-effort approach to showing what's changed between the installed version and the updated version that's available via the module repository.
      At present, it is only able to talk to github-hosted repositories in order to ask them for the release notes, the changelog file (if present) and a list of commits between the git tag that matches the installed version and the tag matching the latest version.
      It will display the Release Notes (if the author is using the feature), else it will display the commits between the tags (if tagging is used by the module author) else it will show the changelog file (if present) else it will show the latest N commits on the master branch (N, of course, being configurable to your liking.)
      An example of the Github Release Notes pulled in for you, taken from Mike Rockett's TextformatterTypographer Module...

      An example of a tag-to-tag commit list from the same module...

      An example of a changelog - formatted to show just the changes (formatting styles will change)...

      Finally, an example of a fallback list of commits - sorry Adrian ...

       
      Making breaking changes obvious.
      This is currently done by searching for a set of configurable search strings. Later versions may be able to support breaking change detection via use of Semantic Versioning - but this may require some way of signalling the use of this versioning standard on a module-by-module basis.
      For now, then, you can customise the default set of change markers. Here I have added my own alias to the list of breaking change markers and the changes section of the changelog is styled accordingly (these will be improved)...

       
      Make reading of a module's support documentation, post-install, a trivial task.
      This is done by making some of the support files (like the README, CHANGELOG and LICENSE files) readable from the module's information/settings screen. There is an option to control the initial open/closed state of this section...

      Here is Tracy's README file from within the module settings page... 

       
      Make module authors start to think about how they can improve the change discovery process for their modules.
      There are notes in each of the sections displayed on the upgrade confirmation page that help authors use each of the features...

       
      Make sure display of external information doesn't introduce a vulnerability.
      This is an ongoing concern, and is the thing that is most likely to delay or prevent this module's release lead to this module's withdrawl should a vulnerability be found. Currently, output is formatted either via Markdown + HTML Purifier (if it was originally a Markdown file) or via htmlspecialchars() if it has come from a plaintext file.
      If you discover a vulnerability, please get in contact with me via the forum PM system.
       
      Ongoing...
      For now, I've concentrated on integration with GitHub, as most people use that platform to host their code. I know a few people are hosting their repositories with BitBucket (PWFoo comes to mind) and some with GitLab (Mike Rockett?) and I would eventually like to have adaptor implementations for these providers (and perhaps GitKraken) - but for now, GitHub rules and the other hosts are unsupported.
       
      Links
      Github: ModuleReleaseNotes
      PW Module Repository: Here
    • By FrancisChung
      Hi,
      I was wondering if anyone knew what this did? 

      If so, do you know what modules it actually impacts? Is there another log that lists the action it took?

      I'm having some weird problems with PHP duplicate declaration per link below, since this module was run.
       
       
    • By tpr
      AdminOnSteroids
      Various admin tweaks to enhance ProcessWire admin.
      http://modules.processwire.com/modules/admin-on-steroids/
      https://github.com/rolandtoth/AdminOnSteroids