Forum Replies Created
- AuthorPosts
kryspin
ParticipantHi Ally,
Looks like it works! Thanks a lot!
Best regards
Kryspin
kryspin
ParticipantHi, thanks for your reply. I check all fields and everything are of type “Email Address”. Our form is here http://younglions.cz/prihlaska/
It’s register form for a competition and an applicant can submit more teams (max 4 teams = 8 emails). Error is always if you submit less teams than is a limit.
I think that form and code wants to send email to all teams, but sometimes applicant send just 2 teams.
kryspin
ParticipantHi, thank you for your help. I have problem now. I added little more adresses
function mytheme_add_autoreply_bcc($mailer, $form, $attachments)
{
$email2 = $form->getValue('iphorm_1_23');
$email3 = $form->getValue('iphorm_1_32');
$email4 = $form->getValue('iphorm_1_49');
$email5 = $form->getValue('iphorm_1_53');
$email6 = $form->getValue('iphorm_1_71');
$email7 = $form->getValue('iphorm_1_78');
$email8 = $form->getValue('iphorm_1_94');
$email9 = $form->getValue('iphorm_1_101');if ($email2) {
$mailer->AddAddress($email2);
}if ($email3) {
$mailer->AddAddress($email3);
}if ($email4) {
$mailer->AddAddress($email4);
}if ($email5) {
$mailer->AddAddress($email5);
}if ($email6) {
$mailer->AddAddress($email6);
}if ($email7) {
$mailer->AddAddress($email7);
}if ($email8) {
$mailer->AddAddress($email8);
}if ($email9) {
$mailer->AddAddress($email9);
}$mailer->SingleTo = true;
return $mailer;
but after submitting it send me: An error occurred submitting the form
My debbug is:
[29-Mar-2013 12:10:55 UTC] PHP Fatal error: Uncaught exception 'phpmailerException' with message 'Invalid address: @' in /data/www/html/zakaznici/www/Flemedia/younglions.cz/wp-includes/class-phpmailer.php:498
Stack trace:
#0 /data/www/html/zakaznici/www/Flemedia/younglions.cz/wp-includes/class-phpmailer.php(438): PHPMailer->AddAnAddress('to', '@', '')
#1 /data/www/html/zakaznici/www/Flemedia/younglions.cz/wp-content/themes/lotus/functions.php(260): PHPMailer->AddAddress('@')
#2 [internal function]: mytheme_add_autoreply_bcc(Object(PHPMailer), Object(iPhorm), Array)
#3 /data/www/html/zakaznici/www/Flemedia/younglions.cz/wp-includes/plugin.php(173): call_user_func_array('mytheme_add_aut...', Array)
#4 /data/www/html/zakaznici/www/Flemedia/younglions.cz/wp-content/plugins/iphorm-form-builder/includes/common.php(812): apply_filters('iphorm_pre_send...', Object(PHPMailer), Object(iPhorm), Array)
#5 /data/www/html/zakaznici/www/Flemedia/younglions.cz/wp-content/plugins/iphorm-form-builder/includes/common.php(486): iphorm_process_form()
#6 [internal function] in /data/www/html/zakaznici/www/Flemedia/younglions.cz/wp-includes/class-phpmailer.php on line 498- AuthorPosts