Welcome Guest, Not a member yet? Register   Sign In
Config mail using settings
#1

HI,
is there a way to use https://github.com/codeigniter4/settings to config email instead of  Config/Email
i try to use : 
Code:
      service('settings')->set('Email.protocol', 'smtp');
      service('settings')->set('Email.SMTPHost', 'smtps.xxxxx.it');
      service('settings')->set('Email.SMTPUser', '[email protected]');
      service('settings')->set('Email.SMTPPass', 'xxxxxx');
      service('settings')->set('Email.SMTPPort', '465');
      service('settings')->set('Email.SMTPCrypto', 'ssl');
But if i try to send email i have no smtp configured
Reply
#2

Library Reference Email Class - CodeIgniter 4 User Guide - Setting Email Preferences
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

so i  can't use the database, right?
Reply
#4

what have you done?
How do you do it?
what are the results like?
@xxxx[{::::::::::::::::::::::::::::::::>
Reply
#5

You can do it you just need to use an array and then initialize the Email Class.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB