Error while creating new user!! serious one (using the built in security module)

hi guys, today was my first time to create a new user other than the admin that security module is creating it by default when adding the security module…

when trying to add new user now, (after deploying to localhost, and all works fine, including admin login all ok)

i can open the add-user form but when adding the data and trying to save it… here is the error!!


Fatal error: Uncaught exception 'Swift_RfcComplianceException' with message 'Address in mailbox given [] does not comply with RFC 2822, 3.6.2.' in E:\xampp\project1\_lib\prod	hird\swift\classes\Swift\Mime\Headers\MailboxHeader.php:308 Stack trace: #0 E:\xampp\project1\_lib\prod	hird\swift\classes\Swift\Mime\Headers\MailboxHeader.php(238): Swift_Mime_Headers_MailboxHeader->_assertValidAddress('') #1 E:\xampp\project1\_lib\prod	hird\swift\classes\Swift\Mime\Headers\MailboxHeader.php(96): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array) #2 E:\xampp\project1\_lib\prod	hird\swift\classes\Swift\Mime\Headers\MailboxHeader.php(60): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array) #3 E:\xampp\project1\_lib\prod	hird\swift\classes\Swift\Mime\SimpleMimeEntity.php(581): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array) #4 E:\xampp\project1\_lib\prod	hird\swift\classes\Swift\Mime\SimpleMessage.php(200): Swift_Mime_SimpleMimeEntity->_setHeaderFieldModel('From', Array) #5 E:\xampp\project1\sec_f in E:\xampp\project1\_lib\prod	hird\swift\classes\Swift\Mime\Headers\MailboxHeader.php on line 308

note: i don’t have mail server setup on the localhost, but i don’t think this is a problem!! i don’t want mailing for example?! does that prevent creating a user!?!?

what other methods or ideas or work arounds of even fixes for this may i get???

If you simply want it to stop / disable sending out an email when you add or edit users, then you can comment out the line:

send_mail_to_admin();

in the “onAfterInsert” event in these 2 applications:

app_form_add_users (Form)
app_form_edit_users (Form)

forgot thank you about this :slight_smile: that was ok and allowed me to create users in the dev environment long time back, then figured out that is better to create them when on production with mail server active so to check things :slight_smile:

thanks adz :slight_smile:

forgot to thank you about this :slight_smile: that was ok and allowed me to create users in the dev environment long time back, then figured out that is better to create them when on production with mail server active so to check things :slight_smile:

thanks adz :slight_smile:

no problem :slight_smile:

I’m having same problem again and again. When I tried to add new user using generated Security app_form_add_users, there is error just like below appear once I click ADD button:

Fatal error: Uncaught exception ‘Swift_RfcComplianceException’ with message ‘Address in mailbox given [admin@myagris.com, zam2best@gmail.com, zam2best@gmail.com] does not comply with RFC 2822, 3.6.2.’ in C:\Program Files\NetMake\v8\wwwroot\scriptcase\prod hird\swift\classes\Swift\Mime\Headers\MailboxHeader.php:308 Stack trace: #0 C:\Program Files\NetMake\v8\wwwroot\scriptcase\prod hird\swift\classes\Swift\Mime\Headers\MailboxHeader.php(238): Swift_Mime_Headers_MailboxHeader->_assertValidAddress(‘admin@myagris.c…’) #1 C:\Program Files\NetMake\v8\wwwroot\scriptcase\prod hird\swift\classes\Swift\Mime\Headers\MailboxHeader.php(96): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array) #2 C:\Program Files\NetMake\v8\wwwroot\scriptcase\prod hird\swift\classes\Swift\Mime\Headers\MailboxHeader.php(60): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array) #3 C:\Program Files\NetMake\v8\wwwroot\scriptcase\prod hird\swift\classes\Swift\Mime\SimpleHeaderFactory.php(60): Swift_Mime_Headers_MailboxHeader->setFieldBody in C:\Program Files\NetMake\v8\wwwroot\scriptcase\prod hird\swift\classes\Swift\Mime\Headers\MailboxHeader.php on line 308

I wondering why this error appear. This is error appear during development using my notebook as I put the actual production mail server configuration in the Scriptcase Security Module. I’m using scriptcase 8. Please someone kindly help me on this matter…

hi, try as my answer above, it is related to email

Look at the error. Does it send the email well with only one email address? You are using , as separators, have you tried with ‘;’ ?

Albert, he is on development enviornment. Many things can block the email function i guess

I know, but the error is 'Address in mailbox given [admin@myagris.com, zam2best@gmail.com, zam2best@gmail.com] does not comply… ’ so it has nothing to do with the environment he’s in.

Hi Mike and Albert,

Thank you for your reply. I’m new to PHP and scriptcase. However, after check into the system, I’ve made changes to ‘,’ to the ‘;’ as suggested by Albert in send_mail_to_new_user function in PHP methods and it works. Many thanks guys. Really appreciate it…