Jump to content
ank

Send email on website update

Recommended Posts

Is it possible to have in inputfield so users can leave there adress and receve an e-mail when the site is updated ?

Can i store the email addresses in processwire ? Is this possible ? Any ideas how to do that ?

How do i send the email ?  I can make a page in Processwire but how to send it ? Beter would be that this is fully automaticly, just send an email with the link to the new page.

Is this possible with Processwire ?

 

Thanks

Ank

Share this post


Link to post
Share on other sites

yes this is possible. The link to a page can be retrieved by:

$page->httpurl()

here you need the full http url, not the internal $page->url (!)

Emailsending is simple via wiremail

 

Share this post


Link to post
Share on other sites

Are these users in the front or backend? If the backend, users already have email addresses. If you want to automate anything, the normal way is to either user cron or an autoload module (using Hooks). In your case, the latter is a good fit. You would want to Hook into 'Pages:added' (rather than sending emails every time the page is saved)

Edited by kongondo
  • Like 1

Share this post


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

@adrian, page save might result in emails being sent every time that page is saved. I suggest 'Pages:added' instead.

Sure, but he asked for when the site is "updated" - surely a change to a page is an update :)

Just noticed that he wrote: "just send an email with the link to the new page" - so yes, Pages::added would be much better :)

 

Share this post


Link to post
Share on other sites
18 hours ago, adrian said:

so yes, Pages::added would be much better

Pages::published perhaps even more so :)

  • Like 4

Share this post


Link to post
Share on other sites

thanks for the advise,

i will try with the solutions here above, i am a front end developer so this is difficult for me.

 

But mayby is it better to have a button (in the back-end) after the pagename, next to the buttons 'edit', 'view' ... to send an email that the page is updated. Is this possible ?

So the page can be viewed first before a email is send.

Share this post


Link to post
Share on other sites

This module (http://modules.processwire.com/modules/process-page-delete/) is now obsolete, but it will show you how you can add your own page list action button.

An easier option might be to make use of the RuntimeMarkup module (http://modules.processwire.com/modules/fieldtype-runtime-markup/) to add an email button to the page editor interface.

Hope that helps to get you going.

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.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...