Does Gmail API Support Codeigniter Without SMTP? |
Does Gmail API Support Codeigniter? I searched on the internet and just found the code using the SMTP server only. I want to use Gmail API instead of SMTP. It will be really appreciated if you guys can help me with it...
![]()
if your question is can you use gmail , say for using with a contact form , in a view on your web , so that you can get feedback /messages from web surfers, then the answer is yes.
The text entered into the form in my case , I use POST to a route, and the route then evokes a controller class and a method to do the processing . In the controller I make use of PHPMAiler library . There is a codeigniter class for using SMTP but to be honest couldn't get my head; i'm using PHPMailer and have had no problems. The section to use google in a contoller using PHPMAILer is along the lines of is along the lines of : Code: <?php namespace App\Controllers; Obviously those more clever than me won't do it directly in a controller but use a manager class or something then : Code: $mail->Host = 'smtp.gmail.com'; i put PHPMailer at web root then used in autoloader: Code: ublic $psr4 = [ if thats not your question can you elaborate. Just re-read your post - you don't want to use SMTP never mind my post might give option/ help other user ?
|
Welcome Guest, Not a member yet? Register Sign In |