henri

email

Recommended Posts

Hi Guys,

i am a newbe to processwire. Have to maintain a website, but never worked with processwire. I have got an form that is submitted ( i do not have the form thing), to two email addresses. The last week the mails to the second address aren't delivered so it seems. Where do i find the email addresses where the form is submitted to?? I cant find them, though i can find the include of the form. Who knows?????

Share this post


Link to post
Share on other sites

It might be specified in a module's settings. Seach for one with wiremail / contact or a similar name

59b1a6c398c86_2017-09-0723_05_10-PagesProcessWirepw_dev.thumb.png.e3ef0b5a1c9263acd23ff1963bec6bae.png

Check Setup > Fields, any fields with names related to email? If there is one,  from top menu go to Pages > Find and pick that field and fill your email to value field

59b1a7f00e865_2017-09-0723_10_53-FindProcessWirepw_dev.thumb.png.49daa6d047d43f0d366e68e116890015.png

Also, do you have access to source files? 

Share this post


Link to post
Share on other sites

Hmm that looks quite outdated. My suggestions may not even exists in your version. Also the module list seem to include only core modules.

Since you have the sources, can you download /site/templates and /site/modules folders and search all files for @ symbol?

  • Like 1

Share this post


Link to post
Share on other sites

There shouldnt be too many of it. (Unless the developer annotated everything with PHPDocs)

 

Share this post


Link to post
Share on other sites

sorry, no "@" there (yeah there are but not relevant ones). Is it possible to reach the database directly???

Share this post


Link to post
Share on other sites
22 minutes ago, henri said:

I have got an form that is submitted ( i do not have the form thing), to two email addresses.

Is that a front-end form? And what is that "form thing" you don't have?

  • Like 1

Share this post


Link to post
Share on other sites

I have got Heidi for MySQL databases, works perfect... will try with this one because this will work from within...

will try

o fbg13 i meant as form module that you can buy

Share this post


Link to post
Share on other sites

start with field_email field and click select data

59b1ae2040416_2017-09-0723_37_30-Kies_field_email-Adminer.png.ed19f7b6f28b46f61925f0e03ed5ee9e.png

If you cant find it, try other fields

Share this post


Link to post
Share on other sites

I changed a field value within that. But that was another email altogether, so i dont know these are the fields used to send an email to

Share this post


Link to post
Share on other sites

Do you know the exact email address that should have been getting those emails?

Share this post


Link to post
Share on other sites

@henri You shouldn't need to search the db. You need to figure out where the code that sends the emails is and work from there.

Find the page with the form in the page tree and find its template. Then look at the template file for the code responsible for sending the emails.

  • Like 1

Share this post


Link to post
Share on other sites

Seach for `mail(` & `send(` inside the /site/templates/ folder

Share this post


Link to post
Share on other sites

Abdus, they are nowhere. Only the ones that i just created in the field you mentioned. AND somewhere in comments.. so it isnt here??

I will try the other search  'mail(& `send(`

Share this post


Link to post
Share on other sites

nothing, only those things,,,,

----------------------------------------
Find 'mail' in 'E:\WS_FTP Pro\ldesss\site\templates\log.php' (17-10-2014 0:00:00; 17-10-2014 0:00:00):
E:\WS_FTP Pro\xxxxxx\site\templates\log.php(22): $body .= '<thead><tr><td><strong>Datum</strong></td><td><strong>Naam/email</strong></td><td><strong>Onderwerp bericht</strong></td></tr></thead>';
E:\WS_FTP Pro\xxxxxx\site\templates\log.php(31):     $name_email = $fields[1];
E:\WS_FTP Pro\xxxxxx\site\templates\log.php(32):     $name_email = str_replace('<', '&lt;', $name_email);
E:\WS_FTP Pro\xxxxxx\site\templates\log.php(33):     $name_email = str_replace('>', '&gt;', $name_email);
E:\WS_FTP Pro\xxxxxx\site\templates\log.php(34):     $body .= '<td>' . $name_email . '</td>';
Found 'mail' 7 time(s).
----------------------------------------
Find 'mail' in 'E:\WS_FTP Pro\xxxxxx\site\templates\news.php' (26-3-2014 0:00:00; 26-3-2014 0:00:00):
E:\WS_FTP Pro\xxxxxx\site\templates\news.php(85):         'email' => 'Uw emailadres',
Found 'mail' 2 time(s).
Search complete, found 'mail' 9 time(s). (2 file(s)).

Share this post


Link to post
Share on other sites
11 minutes ago, fbg13 said:

Find the page with the form in the page tree and find its template. Then look at the template file for the code responsible for sending the emails.

 

Share this post


Link to post
Share on other sites

template is contact page: this is the code

<?php 

/*
=========================
Template for contact page
========================= 
*/

include("./includes/functions.inc.php");

// Set basic variables
$headline = $page->get("headline|title");
$body = $page->body; 

// Load the template
include("./includes/main.inc.php"); 

?>

 

but i think i already looked in those includes also

Share this post


Link to post
Share on other sites

What does contact page look like, can you copy paste HTML source, or check where its <form action=""> attribute points to? (Assuming it doesnt submit using JS)

Maybe the form is in an iframe and mail operations are handled by a 3rd party service?

Can you copy paste templates/log.php here?

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 ihathome
      Hi,
      I'm an abolute newbie in processwire an it's modules. But I have read huge amounts of posts in this forum and as many docs and i learnt a lot in the last days. For a contact-form i used this great module (many thanks) and i hooked it my first time. Everything is alright. Now i search for a possibility to format or render the output in the email. Is there any posibility?
      Thank you for your replies
    • By Kiwi Chris
      Forms are an essential part of most websites, and it's no surprise that there's an excellent premium module Form Builder but what if you're on a zero budget for whatever reason?
      It is possible to build forms quickly and easily by making use of a couple of free modules and the admin UI to give you a great deal of flexibility and speed of development, particularly if you need multiple forms on a website with different fields.
      1. First you're going to need to install a couple of modules:
      Form Template Processor
      Fieldtype Select External Option
      2. For each form that you want to display, create a template without a template file and add fields to it as you normally would. (eg I have formContact, formRegister etc)
      Tip: under the Advanced tab in the setup for each template, I add a tag Forms so that all my forms templates are nicely grouped together in admin.
      3. Create a new field of type Select External Option and call it formTemplate
      In the section Create options from any database table select
      templates as the source table id as the Option Value name as the Option Label 4. Create a new template file and call it renderForm.php (or whatever else you like)
      Add an email field to this form - This will be the email address that forms get submitted to. Add the formTemplate field you previously created to this form. This will allow you to select which of the templates you previously created such as formContact, formRegister etc you want to render. Add any other fields as usual that you want to render on the page. Add the following PHP code to the template file. $recipient = $page->email; $form = $modules->get('FormTemplateProcessor'); $form->template = $templates->get($page->formTemplate->label); // required $form->requiredFields = array('contactName', 'contactEmail', 'contactMesssage'); //Optional: This can be improved by having a field in the page template with a CSV list of required fields eg $form->requiredFields = explode(',', $page->requiredFields) $form->email = $recipient; // optional, sends form as email. FormTemplateProcessor can also save forms to the database. $content .= $form->render(); //generate the form to display. Note: this doesn't actually render the form at this point, but you have it in the $content variable ready to output wherever you want in your template.
      Add any template HTML or other PHP code and echo $content; wherever you want to render the form.
      5. Create a page using the renderForm template, and provide an email address, and select a form that you want to display.
      6. Use CSS to style the form as required.
      7. View your new page, and check that the form renders correctly.
      8. You can modify the templates you created at step 2 or create new ones as required if your requirements for what fields forms display changes.
      Note: The Form Template Processor module can also save form input as pages, and the FieldType Select External Option can be set up with filtering, so this solution can probably be refined further.
    • By Noel Boss
      This module hooks into the login method to provide the possibility to login with the user's email address. This is my first module and it's very simple. Please provide feedback if you have any suggestions. Thanks
      The module can be found in the module repository:
      https://modules.processwire.com/modules/login-with-email/
      or on github:
      https://github.com/noelboss/LoginWithEmail
       
    • By cosmicsafari
      Hi All,
      Just a quick question, if a form has an upload field should there be a working link in the subsequent email which allows you to view the uploaded file?
      As it stands only the name and size of the file appears in the email although viewing the source it appears wrapped in anchor tags, albeit without any href attribute.
      I'm not sure if this is the correct result or if I have somehow managed to cause this and there should be a working link to the uploaded file.
       
    • By Dennis Spohr
      Hi all,
      with 
      $config->adminEmail it's possible to send out an email for fatal errors (for example a syntax-error).
      It would be nice to get also an email in case of an unhandled exception. There could be a situation of an wrong upload and exceptions on the live-page.
      Is this possible?
      Also it could be a very handy feature to be able to choose specific logs which are sent our via email automatically.
      Thanks for your feedback,
      Dennis