You are here
Home > Uncategorized >

47 thoughts on “User registration and email verification PHP and MySQL database – Part 2

  1. Thanks for the tutorial Sir, everything perfectly explained. However, I see that many people (me including )have errors on this SwiftMailer, so I'm guessing it is problem with Swift, maybe some other service would work fine. Anyway, great tutorial ,

  2. Hello! I am getting this error: Fatal error: Uncaught Swift_RfcComplianceException: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. in C:xampphtdocsWebsitesvendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php:355
    Can anyone help? Thanks

  3. Fatal error: Uncaught Swift_RfcComplianceException: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. in

    D:xampphtdocsUser_RegistvendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php on line 355

    i got this error, how do i fix it? i following you step by step

  4. how to solve this error???
    Fatal error: Uncaught Swift_RfcComplianceException: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. in C:xampp2htdocsstock_mgtsystemvendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php:355 Stack trace: #0 C:xampp2htdocsstock_mgtsystemvendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(272): Swift_Mime_Headers_MailboxHeader->assertValidAddress('') #1 C:xampp2htdocsstock_mgtsystemvendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(117): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array) #2 C:xampp2htdocsstock_mgtsystemvendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(74): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array) #3 C:xampp2htdocsstock_mgtsystemvendorswiftmailerswiftmailerlibclassesSwiftMimeSimpleMimeEntity.php(600): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array) #4 C:xampp2htdocsstock_mgtsystemvendorswiftmailerswiftmailerlibclassesSwiftMimeSimpleMessage.php(213): Swift_Mime_SimpleMimeEntity->setHeaderFieldModel('From', Array) #5 C:xampp2htdocsstock_mgtsystemcontrollersemailController.php(42): Swift_Mime_SimpleMessage->setFrom('') #6 C:xampp2htdocsstock_mgtsystemcontrollersauthController.php(70): sendVerificationEmail('masood.abedi.20…', 'ce982e1ef47f554…') #7 C:xampp2htdocsstock_mgtsystemregister.php(2): require_once('C:\xampp2\htdoc…') #8 {main} thrown in C:xampp2htdocsstock_mgtsystemvendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php on line 355

  5. please help. When i download composer it doesnt automatically send the vendor folder into my user-verification folder, and i cant find the exam same files as published in this video

  6. Hello thank you so much for your videos, i uptated the code for PDO sql, and i succeeded to make it work. But in this part 2, i have no error but no email in my google mailbox 🙁 it looks like it was not sent from the signup file ! is there any forum where people had that problem ? and found solutions from others newbies like me ?

  7. Links sent via email asking you to click to verify only appear as links if you give a gmail email address. If you use hotmail or yahoo mail, the 'link' will be text only.

  8. hi, good day Awa! this tutorial is good, but i have a problem regarding on this ' $transport = (new Swift_SmtpTransport('smtp.gmail.com', 465, 'ssl')) '..it's like the "SmtpTranspor" does not recognize in my textcoder that's why ihave a problem calling the " $transport" and "$mailer" container..

    do mind helping/answering me regarding this problem..
    Thanks a lot and God bless.

  9. Do you have the error that goes:

    Fatal error: Uncaught Swift_RfcComplianceException: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. in D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php:355 Stack trace: #0 D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(272): Swift_Mime_Headers_MailboxHeader->assertValidAddress('') #1 D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(117): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array) #2 D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(74): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array) #3 D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeSimpleMimeEntity.php(600): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array) #4 D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeSimpleMessage.php(213): Swift_Mime_SimpleMimeEntity- in D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php on line 355

    well i did… and i solved it!
    I dont remember the tutorial i used, i think ill make a video about it.

  10. I need help!

    I believe i have done it all correctly, but when i fill the signup form i get the error:

    Fatal error: Uncaught Swift_RfcComplianceException: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. in D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php:355 Stack trace: #0 D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(272): Swift_Mime_Headers_MailboxHeader->assertValidAddress('') #1 D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(117): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array) #2 D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(74): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array) #3 D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeSimpleMimeEntity.php(600): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array) #4 D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeSimpleMessage.php(213): Swift_Mime_SimpleMimeEntity- in D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php on line 355

    maybe it's swiftmailer, can i use any other alternatives? Please HELP!

  11. Fatal error: Uncaught Swift_RfcComplianceException: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. in D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php:355 Stack trace: #0 D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(272): Swift_Mime_Headers_MailboxHeader->assertValidAddress('') #1 D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(117): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array) #2 D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(74): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array) #3 D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeSimpleMimeEntity.php(600): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array) #4 D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeSimpleMessage.php(213): Swift_Mime_SimpleMimeEntity- in D:PHPhtdocsMastervendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php on line 355
    ——– Please help me fix

  12. EDIT: For those who dont know how to get your project file directory showing up in CMD you have to type in CMD

    cd project file directory then hit enter.

    NOTE: after 'cd' its followed by a 'space' and then you put in your project file directory *NOT ACTUALLY TYPE OUT "project file directory". 🙂

  13. Notice: Trying to access array offset on value of type null in C:XAMPPhtdocsPHPEMAILVvendoreguliasemail-validatorEmailValidatorParserParser.php on line 147

    Notice: Trying to access array offset on value of type null in C:XAMPPhtdocsPHPEMAILVvendoreguliasemail-validatorEmailValidatorParserParser.php on line 147

    Notice: Trying to access array offset on value of type null in C:XAMPPhtdocsPHPEMAILVvendoreguliasemail-validatorEmailValidatorParserParser.php on line 147

    Fatal error: Uncaught Swift_TransportException: Connection could not be established with host smtp.gmail.com :stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in C:XAMPPhtdocsPHPEMAILVvendorswiftmailerswiftmailerlibclassesSwiftTransportStreamBuffer.php:269 Stack trace: #0 [internal function]: Swift_Transport_StreamBuffer->{closure}(2, 'stream_socket_c…', 'C:\XAMPP\htdocs…', 272, Array) #1 C:XAMPPhtdocsPHPEMAILVvendorswiftmailerswiftmailerlibclassesSwiftTransportStreamBuffer.php(272): stream_socket_client('ssl://smtp.gmai…', 0, '', 30, 4, Resource id #105) #2 C:XAMPPhtdocsPHPEMAILVvendorswiftmailerswiftmailerlibclassesSwiftTransportStreamBuffer.php(58): Swift_Transport_StreamBuffer->establishSocketConnection() #3 C:XAMPPhtdocsPHPEMAILVvendorswiftmailerswiftmailerlibclassesSwiftTransportAbstractSmtpTransport.php(143): Swift_Transport_StreamBuffer->initializ in C:XAMPPhtdocsPHPEMAILVvendorswiftmailerswiftmailerlibclassesSwiftTransportStreamBuffer.php on line 269

    How can I fix this errors ? Please help me.

  14. Uncaught Swift_TransportException: Failed to authenticate on SMTP server with username "*******@gmail.com" using 3 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials s7sm4127780wrr.60 – gsmtp ". Authenticator PLAIN returned Expected response code 235 but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials s7sm4127780wrr.60 – gsmtp ". Authenticator XOAUTH2 returned Expected response code 250 but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials s7sm4127780wrr.60 – gsmtp ". in C:UserskoshiOneDriveDocumentsXampphtdocswebsitevendorswiftmailerswiftmailerlibclassesSwiftTransportEsmtpAuthHandler.php:191 Stack trace: in C:UserskoshiOneDriveDocumentsXampphtdocswebsitevendorswiftmailerswiftmailerlibclassesSwiftTransportEsmtpAuthHandler.php on line 191

    can anyone help me out here, please?

  15. Hey Awa thanks for the tutorial however am getting the error [InvalidArgumentException]

    Package swiftmailer/swiftmailer at version ^6.0 has a PHP requirement incompatible with your PHP version (5.6.40)

    please help

  16. hello everyone! i just solve the
    "Fatal error: Uncaught Swift_RfcComplianceException: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. …"problem
    and
    "Fatal error: Uncaught Swift_TransportException: Failed to authenticate on SMTP server with username …"
    the solution is you have to put your email and password in EMAIL,PASSWORD like…
    define('EMAIL','******@gmail.com');

    define('PASSWORD',"******");
    keep in mind, password need to use " " instead of ' '
    this works for me and also hope its works you guys!! have a nice day!! <3

  17. Awesome..Tell me Awa…is there a way when a person logs in..he goes to his own custom welcome page…not the default index page?..So a unique page based on the user login

  18. A FEW IMPROVEMENTS………………………………….

    Anyone watching that wants to make usernames unique like emails (only 1 username per user)…

    Just replace this…

    $emailQuery = "SELECT * FROM users WHERE email=? LIMIT 1";
    $stmt = $conn->prepare($emailQuery);
    $stmt->bind_param('s', $email);
    $stmt->execute();
    $result = $stmt->get_result();
    $userCount = $result->num_rows;
    $stmt->close();

    if ($userCount > 0)
    {
    $errors['email'] = "Email already exists";
    }

    With this…

    $usernameQuery = "SELECT * FROM users WHERE username=? LIMIT 1";
    $stmt = $conn->prepare($usernameQuery);
    $stmt->bind_param('s', $username);
    $stmt->execute();
    $result = $stmt->get_result();
    $usernameCount = $result->num_rows;
    $stmt->close();

    if ($usernameCount > 0)
    {
    $errors['username'] = "Username already exists";
    }

    $emailQuery = "SELECT * FROM users WHERE email=? LIMIT 1";
    $stmt = $conn->prepare($emailQuery);
    $stmt->bind_param('s', $email);
    $stmt->execute();
    $result = $stmt->get_result();
    $emailCount = $result->num_rows;
    $stmt->close();

    if ($emailCount > 0)
    {
    $errors['email'] = "Email already exists";
    }

    You can also use a similar bit of code for validation when the user clicks the forgot-password button, to check if the email actually exists in the database before trying to email them a link…

    $emailQuery = "SELECT * FROM users WHERE email=? LIMIT 1";
    $stmt = $conn->prepare($emailQuery);
    $stmt->bind_param('s', $email);
    $stmt->execute();
    $result = $stmt->get_result();
    $emailCount = $result->num_rows;
    $stmt->close();

    if ($emailCount == 0)
    {
    $errors['email'] = "Email doesn't exist";
    }

  19. I am getting the error
    Fatal error: Uncaught Swift_RfcComplianceException: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. in E:xampphtdocssampleprojectuser1vendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php:355 Stack trace: #0 E:xampphtdocssampleprojectuser1vendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(272): Swift_Mime_Headers_MailboxHeader->assertValidAddress('') #1 E:xampphtdocssampleprojectuser1vendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(117): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array) #2 E:xampphtdocssampleprojectuser1vendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(74): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array) #3 E:xampphtdocssampleprojectuser1vendorswiftmailerswiftmailerlibclassesSwiftMimeSimpleMimeEntity.php(600): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array) #4 E:xampphtdocssampleprojectuser1vendorswiftmail in E:xampphtdocssampleprojectuser1vendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php on line 355

    how I resolved it

  20. Fatal error: Uncaught Swift_RfcComplianceException: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. in M:XAMPPhtdocsyourPHPvendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php:355 Stack trace: #0 M:XAMPPhtdocsyourPHPvendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(272): Swift_Mime_Headers_MailboxHeader->assertValidAddress('') #1 M:XAMPPhtdocsyourPHPvendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(117): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array) #2 M:XAMPPhtdocsyourPHPvendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php(74): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array) #3 M:XAMPPhtdocsyourPHPvendorswiftmailerswiftmailerlibclassesSwiftMimeSimpleMimeEntity.php(600): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array) #4 M:XAMPPhtdocsyourPHPvendorswiftmailerswiftmailerlibclassesSwiftMimeSimpleMessage.php(213): Swift_Mime in M:XAMPPhtdocsyourPHPvendorswiftmailerswiftmailerlibclassesSwiftMimeHeadersMailboxHeader.php on line 355

    PS: Why I got this error?

  21. Thank you so much bro, I didn't watch this tutorial yet; but I know how to make registration and login form because of you. Once again thank you for your efforts, keep up the good work. God bless you!

  22. Fatal error: Uncaught Swift_RfcComplianceException: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. in

    Please provide solution I have entered valid email for sender & receiver

Leave a Reply

Top