reysagar's avatar

Message:Expected response code "250" but got code "553", with message "553 5.7.1 : Sender address rejected: not logged in"

Hey, In my Laravel application, I have implemented a default email-sending server for the users where they can use the system super-admin default email setup by using the checkbox, but while testing out from the user site it is throwing errors like

---------- Message:Expected response code "250" but got code "553", with message "553 5.7.1 [email protected]: Sender address rejected: not logged in".

I don't know what's going on anyone has any idea how can I resolve this issue?

Note: It works perfectly fine with the super admin side and also works when I enter the same email server details from the user site as well, but whenever I use the default system email setup using the checkbox it shows an error or gets stuck sometimes.

SuperAdmin Side Code>>

<div class="col-md-4">
            <div class="form-group">
                <label>
                {!! Form::checkbox('allow_email_settings_to_businesses', 1,!empty($settings["allow_email_settings_to_businesses"]), 
                [ 'class' => 'input-icheck']); !!}
                @lang('superadmin::lang.allow_email_settings_to_businesses') 
                </label>
                @show_tooltip(__('superadmin::lang.allow_email_settings_tooltip'))
            </div>
        </div>

User Side Code>>

<div class="pos-tab-content">
    <div class="row">
        @if(!empty($allow_superadmin_email_settings))
        <div class="col-xs-12">
            <div class="form-group">
                <div class="checkbox">
                <br>
                  <label>
                    {!! Form::checkbox('email_settings[use_superadmin_settings]', 1, !empty($email_settings['use_superadmin_settings']) , 
                    [ 'class' => 'input-icheck', 'id' => 'use_superadmin_settings']); !!} {{ __( 'lang_v1.use_superadmin_email_settings' ) }}
                  </label>
                </div>
            </div>
        </div>
        @endif
        <div id="toggle_visibility" @if(!empty($email_settings['use_superadmin_settings'])) class="hide" @endif>
1 like
7 replies
reysagar's avatar

Controller code to access checkbox values >>

//Checkboxes
            $checkboxes = ['enable_business_based_username', 'superadmin_enable_register_tc', 'allow_email_settings_to_businesses', 'enable_new_business_registration_notification', 'enable_new_subscription_notification', 'enable_welcome_email', 'enable_offline_payment'];
            $input = $request->input();
            foreach ($checkboxes as $checkbox) {
                $system_settings[$checkbox] = !empty($input[$checkbox]) ? 1 : 0;
            }
tisuchi's avatar

@reysagar It seems somehow email validation problem.

... Sender address rejected: not logged in".

Maybe your system requires user to be logged in to send email???

reysagar's avatar

@tisuchi maybe, but it works perfectly fine from the admin side,

also works when I enter the same details from the user side as well, the only time problem came when I try to access the same email setup details from the user end which are already set up on the admin side.

(which is also the same email server details as well)

Snapey's avatar

@reysagar Typically you can only send from an email account on the mail server, and you will need to authenticate with that user's email address and password.

reysagar's avatar

Thank you for your response @Snapey, I am using a Hostinger email server and I've tried other third-party services like SendGrid, Sendinblue, MailChimp, & default Gmail SMTP to see if it works that way but those services didn't work either,

can you tell me how can I authenticate my admin side email details so other users can use it?

Snapey's avatar

@reysagar You cannot. Such providers do not offer open relay services meaning they will only send for the domain on the account, and for specific verified addresses.

Please or to participate in this conversation.