Jump to content

Recommended Posts

Posted (edited)

hello sorry for bother you with this agian but i just installed phpvms and i dont work for me ... i tried with php mailer that dint work but i do known it is working since when i forgot to change the mail from mysite@blba.com i got a notification about somone tried to log in and that was my server :P well here my local config and uti config :) 

local.config

# Email Settings
Config::Set('EMAIL_FROM_NAME', 'samuel');
Config::Set('EMAIL_FROM_ADDRESS', 'xxhdgamersxx7@gmail.com');

Config::Set('EMAIL_USE_SMTP', true);
// Add multiple SMTP servers by separating them with ;
Config::Set('EMAIL_SMTP_SERVERS', 'smtp.gmail.com');
Config::Set('EMAIL_SMTP_PORT', '465'); // or 587
Config::Set('EMAIL_SMTP_USE_AUTH', true);
Config::Set('EMAIL_SMTP_USER', 'xxhdgamersxx7@gmail.com);
Config::Set('EMAIL_SMTP_PASS', 'password');
Config::Set('EMAIL_SMTP_SECURE', 'ssl');

my util.class

        if($fromname == '') {

            $fromname = Config::Get('EMAIL_FROM_NAME');

            if($fromname == '') {
                $fromname = SITE_NAME;
            }
        }

        $return_path_email = Config::Get('EMAIL_RETURN_PATH');
        if(Config::Get('EMAIL_SMTP_USE_AUTH') == true)
{
$mail->SMTPAuth = Config::Get('EMAIL_SMTP_USE_AUTH'); // <- this line needs to be added
$mail->Username = Config::Get('EMAIL_SMTP_USER');
$mail->Password = Config::Get('EMAIL_SMTP_PASS');
$mail->SMTPSecure = Config::Get('EMAIL_SMTP_SECURE');

}
 

my app.config 

# Email Settings
Config::Set('EMAIL_FROM_NAME', 'samuel');
Config::Set('EMAIL_FROM_ADDRESS', 'xxhdgamersxx7@gmail.com');

Config::Set('EMAIL_USE_SMTP', ture);
# Add multiple SMTP servers by separating them with ;
Config::Set('EMAIL_SMTP_SERVERS', 'smtp.gmail.com');
Config::Set('EMAIL_SMTP_PORT', '465');
Config::Set('EMAIL_SMTP_USE_AUTH', true);
Config::Set('EMAIL_SMTP_SECURE', 'ssl'); # must be "ssl" for Google Apps
Config::Set('EMAIL_SMTP_USER', 'xxhdgamersxx7@gmail.com');
Config::Set('EMAIL_SMTP_PASS', 'password')

i gonna pre thank you for the help :)

Edited by lapw123
  • Administrators
Posted

I don't have an answer to your issue, but.......

What version of phpVMS are you using?

You may wish to edit your post above to remove the email address and password (unless those are only examples).

Posted
20 minutes ago, ProAvia said:

I don't have an answer to your issue, but.......

What version of phpVMS are you using?

You may wish to edit your post above to remove the email address and password (unless those are only examples).

 

im using simpilot 5.5.2

Posted (edited)

okey i found out it is somthing here 

$return_path_email = Config::Get('EMAIL_RETURN_PATH');
         if(Config::Get('EMAIL_SMTP_USE_AUTH') == true)
         if($return_path_email == '') {
            $return_path_email = $fromemail;
        {
         $mail->SMTPAuth = Config::Get('EMAIL_SMTP_USE_AUTH'); // <- this line needs to be added
         $mail->Username = Config::Get('EMAIL_SMTP_USER');
         $mail->Password = Config::Get('EMAIL_SMTP_PASS');
         $mail->SMTPSecure = Config::Get('EMAIL_SMTP_SECURE');

        }

Vangelis said a while ago this 

In order to send authenticated SMTP email over TLS, you need the following in your local.config.php (bug fix!):

Config::Set('EMAIL_USE_SMTP', true);

// Add multiple SMTP servers by separating them with ;

Config::Set('EMAIL_SMTP_SERVERS', 'smtp.example.com');

Config::Set('EMAIL_SMTP_PORT', '25'); // or 587

Config::Set('EMAIL_SMTP_USE_AUTH', true);

Config::Set('EMAIL_SMTP_USER', 'yourname@example.com');

Config::Set('EMAIL_SMTP_PASS', 'p4ssword');

Config::Set('EMAIL_SMTP_SECURE', 'tls');

Then, open up /core/classes/Util.class.php, scroll to line 257 and add in that code block:

if(Config::Get('EMAIL_SMTP_USE_AUTH') == true)

{

$mail->SMTPAuth = Config::Get('EMAIL_SMTP_USE_AUTH'); // <- this line needs to be added

$mail->Username = Config::Get('EMAIL_SMTP_USER');

$mail->Password = Config::Get('EMAIL_SMTP_PASS');

$mail->SMTPSecure = Config::Get('EMAIL_SMTP_SECURE');

}

I already tried this now first i didnt get error msg but since it did go to fast before the mail was sendt i begin to think and yeah it was wrong i posted in the code again now i got error msg on line 313 and 316 so but since it is already somthing on line 257 im abit worried about is gonna move the info from that line and down are i gonna delete everything on that line and under that have something to do with line 257 or im gonna place abit under the line 257 and somthing that have somthing to do with line 257 thank you :) and so if someone could say how and where i gonna put it would be great since not so much php experince 

Edited by lapw123
  • Moderators
Posted

Did you add the config codes from app.config .php and use your server email? If yes try removing the ADDED config codes from your local.config.php and use the server email. I'm assuming you're not on a free host btw.

Posted
1 hour ago, Parkho said:

Did you add the config codes from app.config .php and use your server email? If yes try removing the ADDED config codes from your local.config.php and use the server email. I'm assuming you're not on a free host btw.

Yes i did and the server is from digitalocan 

  • Moderators
Posted

Okay. I don't know digitalocan and if it's free or not but you need to revert back your local.config.php to default meaning NOT TO USE config codes from app.config.php. Then use the email from your host server. If that didn't resolve the issue then replace local.config.php with the default or do a fresh install of phpVMS.

  • Administrators
Posted (edited)

I left all those email settings at their default. I set up phpVMS using an email address associated with the domain I run the program on. The site sends emails correctly.

Site: www.MyAirlineName.com

Email: me@MyAirlineName.com

 

Edited by ProAvia
  • Administrators
Posted

Yes, a Linux server on the hosting end.

Are you on a free host or do you pay for hosting the website? Is the host digitalocen or digitalocean?

  • Administrators
Posted (edited)

The reason I requested clarification is that some have had issues with free hosting and phpVMS.

Have you tried reverting the settings to the defaults and trying the email function again? Here's the default settings from 'app.config.php' for reference:

# Email Settings
Config::Set('EMAIL_FROM_NAME', '');
Config::Set('EMAIL_FROM_ADDRESS', '');

Config::Set('EMAIL_USE_SMTP', false);
# Add multiple SMTP servers by separating them with ;
Config::Set('EMAIL_SMTP_SERVERS', '');
Config::Set('EMAIL_SMTP_PORT', '25');
Config::Set('EMAIL_SMTP_USE_AUTH', false);
Config::Set('EMAIL_SMTP_SECURE', ''); # must be "ssl" for Google Apps
Config::Set('EMAIL_SMTP_USER', '');
Config::Set('EMAIL_SMTP_PASS', '');

# Set specific email addresses to send notifications to
Config::Set('EMAIL_NEW_REGISTRATION', '');
Config::Set('EMAIL_NEW_PIREP', '');

# Whether to send an email or not
Config::Set('EMAIL_SEND_PIREP', true);

# This is email to specifically send email sent error to, such
# as failure notices with an invalid email or something
# If blank, it'll default to the "from" email that's specified
Config::Set('EMAIL_RETURN_PATH', '');

The only change in 'local.config.php' on mine is Config::Set('EMAIL_SMTP_SECURE', 'ssl'); # must be "ssl" for Google Apps - but I can't tell you exactly why it's set that way (as I copied my settings from phpVMS 2.1.936 to phpVMS 5.5.2).

With these settings, emails are send from the email address provided during install. I set up a "main_office@MyAirlineName.com" email address through CPanel prior to installing phpVMS.

Edited by ProAvia
  • Administrators
Posted

Sorry - I'm out of ideas at this point. Someone with more knowledge of how it's supposed to work can hopefully assist you further.

In the mean time, can you install another phpVMS - and leave it all as default - and try the mail function there?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...