rainlab / relax-theme

An example website that sells chairs with editable content.
9 stars 8 forks source link

Send Email using October CMS #4

Closed mittultechnobrave closed 8 years ago

mittultechnobrave commented 8 years ago

0 down vote favorite

i am new to Laravel and currently using OCTOBER CMS .. so i have just downloaded it and installed their provided theme called "Relax" https://octobercms.com/theme/rainlab-relax and activated this theme.

In this theme, they are already providing the contact us form through which we can send email address.

So i just followed the things to send sample contact email for my test which is mentioned in documentation tab from the above url. Here below are the steps i followed which are required.

I created an email template which is required with the code mentioned there.
I created a group as well and created one user and selected this group for this particular user.

I also wanted to use GMAIL SMTP to send emails instead of sendmail feature. So i went to config/mail.php and changed the host name and all the required stuff there.

I also went to OCTOBER admin and changed email settings which may be required by going at Settings => Mail Settings and put the same SMTP settings and saved it.

I did not touch any other code apart from all these and now the main part is, when i m going at Contact Page and trying to send an email i am keep getting this error saying:

"syntax error, unexpected 'parent' (T_STRING)" on line 73 of C:\xampp\htdocs\october_cms2\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Mime\Headers\ParameterizedHeader.php

So i simply went to this file directory and opened this particular file and found this code

public function setCharset($charset)
{
    parent::setCharset($charset);
    if (isSet($this->_paramEncoder)) {
        $this->_paramEncoder->charsetChanged($charset);
    }
}

And i found, this code parent::setCharset($charset); causes this error, but i can't understand why this happening as this is the library file and i should not change anything in this library code as far as i m concerned as i have just downloaded and following the things which OCTOBER requires me to.

Can someone guide me what should i do next to send emails successfully using SMTP in OCTOBER.

    Note: I have tried to find out which current version which i have installed but i am unable to do so hence i am unable to mention here in my question. But the thing is if i go to dashboard its saying Software is up to date so it must be the latest or stable version i am using at the moment.

Your any help or suggestion will be highly appreciated.

Thanks

daftspunk commented 8 years ago

Duplicate https://github.com/octobercms/october/issues/2429