Magnolia CMS's built-in Form: SMTP configuration overriding "From" input - magnolia

On the following page http://documentation.magnolia-cms.com/modules/mail.html#ConfiguringSMTP
In the section "Sending messages >> Plain text and HTML messages", we can read:
From:[...]Regardless of the address entered here, Magnolia CMS will use the smtpUser to send the email but the address here is displayed as the sender to the recipient. This means you can send an email from fake#address.com and it will appear to come from this address
However, when I receive the email I can still see the smtpUser config's email and my "fake#address.com" email address is not displayed (it is ignored!?)
Am I missing something? Thanks

I just tried this on the demo site at http://demoauthor.magnolia-cms.com/demo-project/service/contact.html and it seemed to work as expected.
Are you using a fresh install of Magnolia 4.4.5? Could you verify that you're hitting the "Edit Form Settings" button on the page, going to the "E-Mail" tab, and entering "fake#address.com" into the From field there? If you're then trying the form on a public instance, you'll need to be sure that the form page has been activated so that the public version of it has your "From" setting as well.

Related

Why is there an error when submitting the form?

Please tell me how to solve the problem.
The site is on Wordpress, the page has several modals with forms.
They all work well. I need to configure adding an email to the Sendpulse address book, which the user enters into the field.
Installed the sendpulse package via composer: https://github.com/sendpulse/sendpulse-rest-api-php
The situation is this:
In the directory with the theme, there is a functions.php file where there is a form handler, in which you can configure sending letters with requests from forms.
In this file, I added, according to the instructions from github sendpulse, the code for sending an email to the address book:
require '../private/vendor/autoload.php';
use Sendpulse\RestApi\ApiClient;
use Sendpulse\RestApi\Storage\FileStorage;
define('API_USER_ID', 'b7****************************************');
define('API_SECRET', 'e1*************************************');
$SPApiClient = new ApiClient(API_USER_ID, API_SECRET, new FileStorage());
$bookID = '15********';
$emailForSP = ['test6#test.ru'];
$SPApiClient->addEmails($bookID, $emailForSP);
If you just add this piece to the beginning of the file, then it works out and the address is added to the book. But sending letters to mail does not work, an error is thrown: https://hsto.org/webt/v8/qn/le/v8qnled6ibyy-ltp9afwyrjv-2q.jpeg
In the error_log file the line is: https://hsto.org/webt/mk/vo/g0/mkvog03mb7olfji0qrjcsyxktf0.jpeg
Error text from main.js file: https://hsto.org/webt/cd/-n/ry/cd-nryfx06_mvgtglu-t9msp8ga.jpeg
That is, this piece of code somehow affects the processing of the form handler function. In general, I need to trigger sending an email to the book after sending a letter to the mail, but in this case nothing works at all.
I didn't look for the cause of the conflict for a long time. Allocated sending e-mail in the sendpulse into a separate file and added ajax post request to this file. I don’t know why I hadn’t thought of this before.
let emailForSendPulse = $form.find('[name="email"]').val();
$.post('/wp-admin/smth.php', {email: emailForSendPulse}, function(data){
console.log('Form sended');
});

Can't reset user's password in Google Identity Toolkit: "CAPTCHA_CHECK_FAILED"

I'm trying to setup my Google Identity Toolkit so users can reset their passwords. I'm following the documentation here: https://developers.google.com/identity/toolkit/web/required-endpoints#send_email_url
I'm using the PHP Gitkit Client outlined here: https://github.com/google/identity-toolkit-php-client/blob/master/src/GitkitClient.php
Specifically the function getOobResults() on line 307 seems to be unhappy for some reason. Here's where I'm at:
User sets up account and logs in successfully
User then logs out and starts to log back in, enters email in and clicks "Forgot password"
reCaptcha is shown, click check box and then hit continue
At this point my 'Send Email URL' endpoint (gitkitEmail.php) is successfully called and the following POST is set to it (dropping the full '&response' param since it goes on for a while):
action=resetPassword&email=xodfebefa%40nada.ltd&challenge&response=03ACgFB9tGlNt2KAGhrVY....
I then take that string and parse it using parse_str(); since getOobResults() is looking for an array. However, response I get back is always:
{
"response_body": {
"error": "CAPTCHA_CHECK_FAILED"
}
}
I searched around but can't find any details on this error. Any help would be appreciated. I don't have a reCaptcha setup anywhere on my site, unsure if this is expecting me to do that and that's why it's failing? Also, I did bump all my code to a production environment and got the same error there as I did on my localhost.

Contact Form 7 mails are being marked like spam

All the mails sent from a Contact Form 7 form are being marked by gmail as spam.
A hint: I looked at the option "Show Original" and I found stuff like this:
Return-Path: <www-data#localhost>
....
Received-SPF: none (google.com: www-data#localhost does not designate permitted sender hosts) client-ip=178.216.103.114;
....
Authentication-Results: mx.google.com;
spf=neutral (google.com: www-data#localhost does not designate permitted sender hosts) smtp.mail=www-data#localhost;
dmarc=fail (p=NONE dis=NONE) header.from=gmail.com
See all thos www-data#localhost ? My guess is that they have something to do with the problem (but I could be wrong).
What could I do to solve this problem on the server side?
This is a common issue with Contact Form 7 and some php mail or server settings on some hosts.
Try hardcoding the sender name in the ‘From:’ field in the ‘Mail’ section like Webmail <a-valid-address#mydomain.com> This means you won't see the sender name or email as names and return emails in your incoming mail box, but that doesn't matter much, as the sender's email will be in the body of the message.
If that doesn't work, try https://wordpress.org/plugins/wp-mail-smtp/ to use SMTP instead of php mail.
And see http://contactform7.com/faq/ and http://buzztone.com.au/contact-form-7-email-issues/
This can be solved via using "WP Mail SMTP" plugin which is for enabling SMTP auth in wordpress. Just install the plugin via wordpress admin or download and extract the plugin zip file to wordpres plugins folder. Correct permissions.
Activate "WP-Mail-SMTP" plugin in wordpress admin >> Plugins. Then go to Wordpress Admin >> Settings >> Email
Enter your email settings as mentioned in the screen shot. Make sure you have turned ON "Use SMTP authentication". If you are using remote MX, specify the remote MX instead of "localhost" in SMTP Host.
This month i had the same problem, after suffering for two weeks I found the problem.
The WordPress default CONFIG -> DISCUSSION is applying the disallowed words list to the CF7 forms.
Try adding this code snippet to your child theme functions.php file:
/**
* CONTACT FORM 7
* Disable WP Disallowed List for SPAM validation
*/
add_filter( 'wpcf7_submission_has_disallowed_words', '__return_false', 10, 2 );
It worked for me.

Login fails on Subtext

I have just downloaded subtext 2.5 source code and manage to run it on Visual Studio dev server. The problem is that whenever I try to navigate to admin/.. it redirects me to login page and it's not accepting default login credentials that are, I suppose, haacked and password respectively. But I was unable to login to the site.
Subtext_Host table of db contains following entry:
userid= Haacked, password= sIHb6F4ew//D1OfQInQAzQ== salt=KrPog8xD4kKBwW35zBxxCA== email=haacked#gmail.com datecreatedutc = 2011-06-11 21:37:29.533
I also tried resetting the password as described here (scroll to bottom) but to no avail.
The password you have reset is the Hostadmin password, accessible via http://<yoururl>/hostadmin/default.aspx by logging in there you should be able to reset the password for the particular blog you are interested in.

Wildcards in an email address with qmail?

I'm trying to set up an email address in qmail such that a unique identifier can be passed as part of the email address.
For example:
reply-123#example.com, reply-345#example.com, reply-99999#example.com would all go to the 'reply' user and be sent to the same shell script. Currently, email sent to reply#example.com goes to the script and I pass the unique id in the subject or message body. Would be grateful for any suggestions. Thanks!
In a default qmail setup, you can do exactly what you suggest... anything following a dash is ignored for delivery purposes, so reply-anything#example.com will be processed by the .qmail-reply file, where you would presumably send the mail to your script and look at the address to obtain the identifier.
We use this for bounce tracking - if the email is to xyz#example.com, and the sender is bounce#sender.com, then the from address is written this way:
bounce-xyz=example.com#sender.com
And a script flags the address as no good.
EDIT:
I screwed this up a bit - I guess I'm rusty on qmail. The alias thing doesn't work by default as I stated above. To support extensions for bounce#sender.com, you need a .qmail-default file in ~bounce.
See the "extension addresses" (section 4.1.5) on LWQ: http://www.lifewithqmail.org/lwq.html

Resources