{"action":"created","issue":{"url":"https://api.github.com/repos/forkcms/forkcms/issues/1120","labels_url":"https://api.github.com/repos/forkcms/forkcms/issues/1120/labels{/name}","comments_url":"https://api.github.com/repos/forkcms/forkcms/issues/1120/comments","events_url":"https://api.github.com/repos/forkcms/forkcms/issues/1120/events","html_url":"https://github.com/forkcms/forkcms/issues/1120","id":59968763,"number":1120,"title":"Error when sending an email with setReplyTo from Api","user":{"login":"ghazispeakserve","id":4991088,"avatar_url":"https://avatars.githubusercontent.com/u/4991088?v=3","gravatar_id":"","url":"https://api.github.com/users/ghazispeakserve","html_url":"https://github.com/ghazispeakserve","followers_url":"https://api.github.com/users/ghazispeakserve/followers","following_url":"https://api.github.com/users/ghazispeakserve/following{/other_user}","gists_url":"https://api.github.com/users/ghazispeakserve/gists{/gist_id}","starred_url":"https://api.github.com/users/ghazispeakserve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghazispeakserve/subscriptions","organizations_url":"https://api.github.com/users/ghazispeakserve/orgs","repos_url":"https://api.github.com/users/ghazispeakserve/repos","events_url":"https://api.github.com/users/ghazispeakserve/events{/privacy}","received_events_url":"https://api.github.com/users/ghazispeakserve/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-05T15:38:10Z","updated_at":"2015-03-05T15:50:33Z","closed_at":null,"body":"I am sending an email insinde Api.php class. The code below generates an error\r\n\r\n```\r\nFatalErrorException Error: Call to a member function setReplyTo() on a non-object\r\n```\r\n\r\n```php\r\n$mailer = BackendModel::get('mailer');\r\n\r\n// send email\r\n$from = BackendModel::getModuleSetting('Core', 'mailer_from');\r\n$replyTo = BackendModel::getModuleSetting('Core', 'mailer_reply_to');\r\n$message = \\Common\\Mailer\\Message::newInstance(FL::getMessage('ForgotPasswordSubject'))\r\n\t->setFrom(array($from['email'] => $from['name']))\r\n\t->setTo(array($profileEmail => ''))\r\n\t->setReplyTo(array($replyTo['email'] => $replyTo['name']))\r\n\t->parseHtml(\r\n\t\tFRONTEND_MODULES_PATH . '/Profiles/Layout/Templates/Mails/ForgotPassword.tpl',\r\n\t\t$mailValues,\r\n\t\ttrue\r\n\t);\r\n$mailer->send($message);\r\n```"},"comment":{"url":"https://api.github.com/repos/forkcms/forkcms/issues/comments/77388441","html_url":"https://github.com/forkcms/forkcms/issues/1120#issuecomment-77388441","issue_url":"https://api.github.com/repos/forkcms/forkcms/issues/1120","id":77388441,"user":{"login":"ghazispeakserve","id":4991088,"avatar_url":"https://avatars.githubusercontent.com/u/4991088?v=3","gravatar_id":"","url":"https://api.github.com/users/ghazispeakserve","html_url":"https://github.com/ghazispeakserve","followers_url":"https://api.github.com/users/ghazispeakserve/followers","following_url":"https://api.github.com/users/ghazispeakserve/following{/other_user}","gists_url":"https://api.github.com/users/ghazispeakserve/gists{/gist_id}","starred_url":"https://api.github.com/users/ghazispeakserve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghazispeakserve/subscriptions","organizations_url":"https://api.github.com/users/ghazispeakserve/orgs","repos_url":"https://api.github.com/users/ghazispeakserve/repos","events_url":"https://api.github.com/users/ghazispeakserve/events{/privacy}","received_events_url":"https://api.github.com/users/ghazispeakserve/received_events","type":"User","site_admin":false},"created_at":"2015-03-05T15:50:33Z","updated_at":"2015-03-05T15:50:33Z","body":"Same result. If I remove setReplyTo it tells me that Call to a member function parseHtml () on a non-objectdoes !!!"}}