Register |
Your Cart is currently empty.
Home > Forum
Welcome, Guest

Sender email address on notifications
(1 viewing) (1) Guest

Dear Customers,

Feel free to submit requests if you have any questions or need assistance.

Before submitting a support request, please pay attention to the description of the corresponding product and frequently asked questions. Answers you are looking for may already be there.
When submitting a request, please include as many details on the problem as you can. This will help us understand the essence and provide you with a helpful solution.
For more information on our support conditions, view JoomPlace support policy.
THANKS FOR YOUR PATIENCE!
  • Page:
  • 1

TOPIC: Sender email address on notifications

Sender email address on notifications 1 year, 11 months ago #12122

I am using a public survey, so do not have a way to collect the name details and email address for the form submissions, this causes two issues;

1. Is there a way of collecting an email address where the format allows for some validation, even if it's just that the field contains an @ sign

2. On the email submission, after they finish, I get the email Results with no sender email address, is there some
where to set a generic address, such as surveys@mydomain.com so the emails I recieve are a little easier to filter?

Any help is always appreciated.

Re: Sender email address on notifications 1 year, 11 months ago #12130

  • Ann
  • OFFLINE
  • Moderator
  • Posts: 2601
  • Karma: 29
Hi,
1. you'll need to insert the following code in the file surveyforce.html.php on line 1141 (but you'll need to insert the correct id of the question in the if construction plus the text for the wrong email):
if (questions[n].cur_quest_id == <id of the question for email>) {
if (sf_getObj('inp_short'+questions[n].cur_quest_id)) {
answer = sf_escape(sf_getObj('inp_short'+questions[n].cur_quest_id).value);
}

var emailRegExp = /[\w\.\-]+@\w+[\w\.\-]*?\.\w{1,4}/;
if (!emailRegExp.test(answer) {
ShowMessage('error_messagebox', 1, 'Wrong email');
ShowMessage('error_messagebox2', 1, 'Wrong email');
return false;
}
}

2. to make a email in the Results email you need to insert:
$emails[] = 'surveys@mydomain.com';
in the file survey.php on line 1200
JoomPlace.com, JoomlaLMS.com
Tech. Support

Re: Sender email address on notifications 1 year, 3 months ago #13734

  • AFLuca
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
grahama wrote:
On the email submission, after they finish, I get the email Results with no sender email address

Ann wrote:
to make a email in the Results email you need to insert:
$emails[] = 'surveys@mydomain.com';
in the file survey.php on line 1200

This solution is not correct; it is for recipient, not for sender. I think the problem is the no initialization of the global varibles $mosConfig_mailfrom and $mosConfig_sitename in the SF_NextQuestion() function.

I inserted this:

function SF_NextQuestion() {
global $database, $mosConfig_offset, $my, $mosConfig_live_site, $mosConfig_absolute_path, $sf_lang, $mosConfig_mailfrom, $mosConfig_sitename;


Can you fix this for next release ?
Thanks.
Last Edit: 1 year, 3 months ago by AFLuca.

Re: Sender email address on notifications 1 year, 3 months ago #13740

  • Nana
  • OFFLINE
  • Moderator
  • Posts: 926
  • Karma: 9
Thanks a lot for informing.

We've fixed it in the current version. It's available in "Members Area".

Best regards
  • Page:
  • 1
Moderators: tom, Maria_B
Time to create page: 0.48 seconds