php - Issue with "Email Feature" in my project which is made with Symfony2 Framework -


previously, application has built , been hosted in amazon initial authors. after, because of issues amazon changed godaddy, problem here sending email, forgot-password-mails etc , uploading images not working when application in godaddy , working when in amazon.

i googled info aws & understood authors installed aws-sdk-php 3rd party in vendor folder of symfony application & used buckets storing etc...

so in application found variables of aws in config.yml, config.yml, parameters.yml. i've commented these variables , changed code in parameters.yml

from_email_address: xxxxxx@xxx.com mailer_transport: smtp mailer_host: email-smtp.us-west-2.amazonaws.com mailer_user: xxxxxxx mailer_password:  xxxxxxx locale: en secret: xxxxxxxxx debug_toolbar: true debug_redirects: false use_assetic_controller: true amazon_s3.key: xxxxxxx amazon_s3.secret: xxxxxx   amazon_s3.region: eu-west-1 

to

from_email_address: xxxxx@xx.com # mailer_transport: smtp # mailer_host: email-smtp.us-west-2.amazonaws.com # mailer_user: xxxxxxx # mailer_password:  xxxxxxx mailer_transport: gmail mailer_host: smtp.gmail.com mailer_user: xxxxx@xx.com mailer_password: xxxxxxx locale: en secret: xxxxxxx # debug_toolbar: true # debug_redirects: false # use_assetic_controller: true # amazon_s3.key: xxxxxxx # amazon_s3.secret: xxxxxxx   # amazon_s3.region: eu-west-1 

and have changed code in controller from

$maildata = array(                 "name" => $userinfo->getfullname(),                 "email" => $userinfo->getemail(),                 "code" => md5($userinfo->getuid())             );             $email = $this->get('emails_handler');             $subject = "quotemyhouse.com account verification request.";             $message = $this->renderview('appbundle:emails:welcomeemail.html.twig', $maildata);             $email->sendemail($userinfo->getemail(), $subject, $message); 

to

$maildata = array(                 "name" => $userinfo->getfullname(),                 "email" => $userinfo->getemail(),                 "code" => md5($userinfo->getuid())             );              $message = $this->renderview('appbundle:emails:welcomeemail.html.twig', $maildata);            $subject = "quotemyhouse.com account verification request.";             $msg = \swift_message::newinstance()                ->setsubject($subject)                ->setfrom($userinfo->getfullname())                ->setto($userinfo->getemail())                ->setbody($message,'text/html');             $this->get('mailer')->send($msg); 

the above changed details in config.yml & parameters.yml working sample email sending project in localhost.

so hope understood issue i'm facing... in advance...

i expect smtp configurations in godaddy account working. in godaddy mail functions, hostname have keep "localhost". instead of

mailer_host: email-smtp.us-west-2.amazonaws.com 

use mailer_host:localhost

some cases don't require give mailer_user , mailer_password. have try , trial.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -