smtp - Emails not sending, PHP and SwiftMailer -
Text after "
I have my code
& lt ;? Php namespace Spika \ controller; Use the Silke \ Application; Use the Syllux \ Controller ProVirus interface; Use Symfony \ Component \ HttpFoundation \ Request; Use Symfony \ Component \ HttpFoundation \ ParameterBag; Class SendPasswordController SpikaBaseController {Public Function Connect (App $ App) {$ controller = $ app ['controllers_factory']; $ Self = $ this; // $$$ = $ request- & gt; Receive ('email'); $ User = $ application ['spikadb'] - & gt; FindUserByEmail ($ email); If (isset ($ user ['_ id'])) {$ user = $ application ['spikadb'] - & gt; FindUserById ($ user ['_ id'], false); $ ResetCode = $ application ['spikadb'] - & gt; AddPassworResetRequest ($ user ['. _ Id']); $ ResetPasswordUrl = ROOT_URL "/ page / resetPassword /" $ resetCode; $ Body = "reset here password {resetpasswordUrl}" here; Try {if (SEND_EMAIL_METHOD == EMAIL_METHOD_LOCALSMTP) {$ message = \ Swift_Message :: newInstance () - & gt; SetSubject ("Reset Spika Password") - & gt; SetFrom (AdministratorEmail) - & gt; Set to ($ user ['email']) - & gt; Setbody ($ body); $ Mailer = \ swift_miler :: new instance (); $ Mailer- & gt; ($ Message), if (SEND_EMAIL_METHOD == EMAIL_METHOD_GMAIL) {$ transport = \ Swift_SmtpTransport :: newInstance ('smtp.mandrillapp.com', 587) - & gt; SetUsername ('me@me.com ') - & gt; SetPassword ('89f7g8dfg8d7fg0'); $ Message = \ Swift_Message :: newInstance () - & gt; SetSubject ("Reset Spika Password") - & gt; SetFrom (AdministratorEmail) - & gt; SetTo (user $ ['email']) - & gt; SetBody (body $); $ Mailer = \ SwiftMailer :: New Instance ($ transport); $ Mailer- & gt; ($ Message);}} hold (\ exception $ e) {} return 'ok'; } And {return $ self-> returnairrrspace ("invalid email"); } Return 'OK'; }); Return $ Controller; }}? & Gt;
And I'm experimenting with Swiftmailer. Mail is not being sent. I'm using it for code. It seems that there is something called silax, it seems that the script is not sending them because they do not appear on the hinterland. Any help would be appreciated.
Comments
Post a Comment