• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to send emails using CI 4

#1
I don't know this is silly question or not, but I did search for this in forum and google also but not getting any help. However, I came to know that PHPmailer and other libraries are coming in future, but for now, what is the code/how to do code that can send email to users.

I am developing simple sign in/sign up functionality using CI 4 where users needs to confirm their email address when they sign up. So I did try one or two codes but email is not sent to users. Here is code samples that I did try but not getting success. So can anyone please help me, how can I send emails to user.

Quote:Using simple PHP code :

PHP Code:
$to 'test@gmail.com';
$subject 'the subject';
$message 'hello';
$headers 'From: test@domainname.com' "\r\n" .
    
'Reply-To: test@domainname.com' "\r\n" .
    
'X-Mailer: PHP/' phpversion();

if(
mail($to$subject$message$headers)) {
    echo 
'send';
}
else {
    echo 
'not send';    

Reply


Messages In This Thread
How to send emails using CI 4 - by ashok.desai64 - 06-07-2019, 03:29 AM
RE: How to send emails using CI 4 - by MGatner - 06-07-2019, 07:44 PM
RE: How to send emails using CI 4 - by Avega Soft - 06-07-2019, 10:06 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.