Home › Toolset Professional Support › [Resolved] Email system not working unable to email individual advert listing users
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Hong_Kong (GMT+08:00)
Tagged: Toolset Forms
This topic contains 21 replies, has 3 voices.
Last updated by Luo Yang 6 years ago.
Assisted by: Luo Yang.
Hi
the Email system not working unable to email individual advert listing users. Please see attached screenshots below.
Overview we are creating a listing website for the general public where anyone can upload and publish a car for sale advert without creating a user account. however we take their email address on upload.
I contacted support on numerous occasions to fix this and resolve the situation but nothing has worked. I think Christian informed me to install the 'classifieds' plugin but this crashed the website and gave errors even though the message system worked. After uninstalling I've taken more advice via support and hte form works but only sends messages to the WordPress ADMIN (we need to messages to be delivered to advertisers ID in wordpress.
So they upload advert here
hidden link
We will then provide them with a login so they have access to their listings and hopefully a place where they can view the emails sent from their advert page only like a page here
hidden link
(At the moment if you view the page above 'messages received' it's just showing all messages sent via the classfied advert pages - Rather than just the specific messages that relate to a particular advert (that are onlyr related to 1 particular wordpress user via ID)
////////////////////////////////////////////////////////////////////////////////////////
the code used is shown below
[credform class='cred-form cred-keep-original']
[cred_field field='form_messages' value='' class='alert alert-warning']
<div class="form-group">
<label>[wpml-string context='cred-form-New message-4715' name='Message Name']Message subject[/wpml-string]</label>
[cred_field field='post_title' post='message' value='' urlparam='' class='form-control' output='bootstrap']
</div>
<div class="form-group">
<label>[wpml-string context='cred-form-New message-4715' name='Message description']Write your message[/wpml-string]</label>
[cred_generic_field field='post_content' post='message' type='textarea' value='' urlparam='' output='bootstrap']
{
"required":1,
"validate_format":1,
"persist":0,
"default":""
}
[/cred_generic_field]
</div>
<p>If you want to send files, use file transfer services like drive.google.com, dropbox.com, we.tl.</p>
[cred_generic_field field='wpcf-message-from' type='hidden' class='' urlparam='']
{
"required":0,
"validate_format":0,
"persist":1,
"generic_type":"user_id",
"default":"[wpv-current-user info='id']"
}
[/cred_generic_field]
[cred_generic_field field='wpcf-message-to' type='hidden' class='' urlparam='']
{
"required":0,
"validate_format":0,
"persist":1,
"generic_type":"user_id",
"default":"[get_author_id_in_archive]"
}
[/cred_generic_field]
[cred_field field='form_submit' value='Send message' urlparam='' class='btn btn-primary btn-lg' output='bootstrap']
[/credform]
////////////////////////////////////////////////////////////////////////////////////////
On reading your toolset guides there is conflicting information online and some people say this can be done with one guy remarking why was this email system shown in your classified cars DEMO website if it can't be done?
After also downloading the classified cars DEMO site on friday to see if I could copy any code or gain insights I noticed the message system is no longer present yet still advertised on your toolset website literature.
I AM TOTALLY CONFUSED??????
See your website here - DEMO SITE
hidden link
The email is no longer featured but is mentioned here
https://toolset.com/learn/build-directory-classifieds-sites-using-toolset/
See template page 'button '' contact advertiser
kind regards
Paul
Dear Paul,
The the 'classifieds' plugin is retired, so you don't need to install it any more.
See details here:
https://toolset.com/account/downloads/#application-frameworks
click "Reference Sites"
find demo site "Classic cars for sale - classified site", click link "Plugins used", there isn't 'classifieds' plugin
For the email problem, you are using custom shortcode [get_author_id_in_archive] for the generic field "wpcf-message-to"
[cred_generic_field field='wpcf-message-to' type='hidden' class='' urlparam=''] { "required":0, "validate_format":0, "persist":1, "generic_type":"user_id", "default":"[get_author_id_in_archive]" } [/cred_generic_field]
I have tried these in my localhost:
1) replace [get_author_id_in_archive] shortcode with a static user ID value, for example 1
2) Test the form in front-end, I can get the email without any problem
So I suggest you check the custom shortcode [get_author_id_in_archive], debug it manually.
Or you can replace with another wordpress user ID, and test again.
Hi Luo
thanks for the info however entering a number ID value means all the messages go the same user.
With our website we are creating a 'vehicles for sale' listng site like autotrader.co.uk
hidden link
This means each advert is listed by a different user so for example if we had 4 different users uploading 1 x advert each we would know have 4 individual unique email addresses. So with the enquiry form on each single vehicle page we need to send the reply to that specify email address (in the form) that was used to upload the advert via the user. We require a dynamic solution that can ensure the reply from the enquiry form is sent to each individual specific email address.
Kind regards
Paul
Funeral Directors Stockport
hidden link
So it is a problem of the custom shortcodes: [get_author_id_in_archive].
Can you confirm it?
I have searched it in our forum, it comes from this thread:
https://toolset.com/forums/topic/author-page-single/#post-618800
That thread is talking about author archive page , are you displaying the Toolset form in author archive page?
If it isn't, then that shortcode won't work in your case.
If you need more assistance for the custom shortcode, please point out the problem page URL, where and how do you display the Toolset form? thanks
Hi Luo I will require more help with the shortcode please this is greatly appreciated.
To understand the process of how the website works please see the journey and links below
//////////////
Any member of the general public in the UK can place a free advert to sell their car via uploading with this form
hidden link
They don't need to register an account but have to enter a valid EMAIL ADDRESS via the web form upload field
//////////////
Once the advert has been received by the member of the general public it goes live to create a single listing page (example shown below) As per noted above each advert is attached to a different user and a unique email address that they will have used to upload the advert
hidden link
(so this means the message sent via the website visitor when on a particular car listing page for sale needs to go directly to the individual seller of the vehicle they are interested in.
So for example with car adverts we have
ADVERTISER USER 1 (His unique email address)
hidden link
ADVERTISER USER 2 (His unique email address)
hidden link
ADVERTISER USER 3 (His unique email address)
hidden link
ADVERTISER USER 4 (His unique email address)
hidden link
and so on....
cheers
Paul
Dear Paul,
I assume "individual seller" is the post author of those car posts:
hidden link
hidden link
...
If it is, in your case, you don't need the custom shortcode [get_author_id_in_archive], you can get current car post author ID with shortcode:
[wpv-post-author format="meta" meta="ID" id='$current_page']
And use it in your generic field, like this:
[cred_generic_field field='wpcf-message-to' type='hidden' class='' urlparam=''] { "required":0, "validate_format":0, "persist":1, "generic_type":"user_id", "default":"[wpv-post-author format="meta" meta="ID" id='$current_page']" } [/cred_generic_field]
Hi Luo
Thanks for the code and new shortcode. However, I've updated the post form for 'new message' then created a new advert via uploading on this page
hidden link
to create this listing with a new gmail account I've never used before on this website
Advert here (see message string)
hidden link
On the 1st attempt I sent a message but nothing arrives in the gmail account.
So I tried again by creating an author user account in WordPress using the gmail account address.
This 2nd attempt message was also never received?
PS: I can supply login details if required
cheers
paul
Dear paul,
For the email problem, please check these:
1) if the email is in your gmail spam folder, you can also test it by editing the Toolset form, edit the email notification, click button "Send a test email", if you can not get the email too, there might be a server/compatibility problem in your website, please check below:
2) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2019, and test again
3) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out the problem page URL and form URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/
Hi Luo
I've tried your suggestions but nothing works the emails are never sent or received (also i've checked spam)
Please click here to download copy of the website and installer.php doc via duplicator
hidden link
//////////////////////
So in brief this is how the website works - a member of the general public (guest user you do not need to create an account or become a member)
Can place an advert via this page here
hidden link
The advert will then go live in the cars for sale page section here
hidden link
With adverts having a single page for the content and enquiry message form
hidden link
So when somebody is interested in the car and send an email enquiry via the form we need this message to go to the email provided in the advert post via the particular advertiser.
Passwords for wordpress admin access are:
WORDPRESS LOGIN DETAILS
Username: T******
Password: *****
////////////////////////////////////////////////////////////////////////////////////////////
Additional Info
Once somebody places an advert and it publishes we will be manually using their email address used in the upload to create a standard WordPress account for them via an 'author' so we can send them some emails and vouchers withn the other services we provide like the shop etc.
////////////////////////////////////////////////////////////////////////////////////////////
EXTRA SUPPORT
Hi Luo After the person has uploaded an advert and then we've sent them a login manually via creating a user account in WordPress.
is it possible to have a page where they can view all their listings privately and edit them? So if they have some classic car, motorcycle and cars for sale on the website they can be edited and managed from one page privately "password protected'
cheers
Paul
Hi Luo a quick email to see if you've managed to have a look at the email system sending messages.
Also is the below possible sent in the earlier message
EXTRA SUPPORT
Hi Luo After the person has uploaded an advert and then we've sent them a login manually via creating a user account in WordPress.
is it possible to have a page where they can view all their listings privately and edit them? So if they have some classic car, motorcycle and cars for sale on the website they can be edited and managed from one page privately "password protected'
cheers
Paul
Dear Paul,
We can handle the problem one by one.
I can import your duplicator package in my localhost.
For the Email problem, I assume we are talking about the Toolset post form "New message":
hidden link
Please edit it, there isn't any Email notification setting in it, I have tried these:
1) Add a email notification in it, same as your screenshot
hidden link
2) install plugin "WP Mail Logging"
http://wordpress.org/extend/plugins/wp-mail-logging/
3) Test it in front-end:
hidden link
4) after submit the form, I can see the email notification is sent without any problem here:
Dashboard-> WP Mail Logging Log
see screenshot email.JPG
Please add an email notification setting in above form, and test again
HI Luo
Just tried all your suggestions above and the email still does not work. Is their anyone more senior at Toolset who could look into this you seem to miss the point.
////////////////
On the site I sent you please add your own car advert like a customer would on the webite via the upload form here
hidden link
The advert will then publish - visit the advert single listing page and send a message enquiry via the form on the page and you'll notice the message is never delivered (you will never receive the message from the website customer 'sender') It won't be in your SPAM and it's not even logged on the WP Mail Logging Log
the only items logged are the advert confirmation emails that it's been received and published after upload
wp logging.png
////////////////
See post message settngs - email receiver/png they are as per you indicated wpcf-message-to and I've also tried with send notidication to the post author and still does not work
////////////////
On the post form I've also tried the 'test message' function see test message.png this is also not delivered?
////////////////
the only messages you receive is from the advert upload confirmation advert confirmation.png
////////////////
I also tried to create a sign-up user form before they can enter hte details into car upload form via this page here
hidden link
this creates a WordPress User - signed email.png then redirects to the Car for sale upload form page - But again you receive the confoirmation of adverts being published but you never receive any advert enquiry messages from people on the website contacting the seller as per noted above
////////////////
URGENT ATTENTION - in the previous message support your request said it would be private yet it appears the login for hte website is PUBLIC - https://toolset.com/forums/topic/email-system-not-working-unable-to-email-individual-advert-listing-users/
Please remove immediately
cheers
Paul
Hi Luo
You will need to test the above on your own install as per the files provided. I've de-installed the cred plugin and tried to reinstall to see if this fixed anything on the dev server site. cheers Paul
For security reason, I have modified your post and remove the credential details. it is not safe to post them publicly, please post those credentials only in private message box.
And for the email problem, as I mentioned above:
there isn't same problem in my localhost with your duplicator package, the email is sent after add the email notification settings. So it should be a server problem, there might be some email problem in your webserver
I suggest you try these:
1) Enable PHP debug mode, test again
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/#php-debugging
Check if there is any PHP errors in your website.
2) Send the email with other plugins, for example:
https://wordpress.org/plugins/check-email/
3) If the problem persists, that means your website can not send emails, you can check it with your webserver provider, or you can try it in other webserver.
@paulF5067
I've been struggling with email problems for 3 months now. I've tried all the major SMTP plugins and the result is the same. All "test" emails indicate the emails are sent but in reality they're not always received. I use GSuite but after months of testing and pulling my hair out, I've come to the conclusion it's something to do with their setup. Google does have a tendency to get "too clever" to the point things stop working. It doesn't even make any difference whether I use 2FA and/or OAuth 2.0 protocol, the story's the same. The only way I can get emails working is using my hosting provider's email server. If you're using an external email service, your forms are all set correctly and you're using valid email addresses, I'd say you need to be asking your hosting provider if their settings are blocking communication with the external email server (sometimes they forget to open a specific port). Hope this helps.