-
Notifications
You must be signed in to change notification settings - Fork 5
Add send mail to developer #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add send mail to developer #13
Conversation
RobinTheHood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very well. Thank you. I have some notes for you. 😊 Maybe you can fix that and make a commit.
src/Classes/SendMail.php
Outdated
| $headers[] = 'From: '.$from.' <'.$fromEmail.'>'; | ||
| if (mail($to, $subject, $message, implode("\r\n", $headers))) { | ||
| Notification::pushFlashMessage( | ||
| array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice, but can you use short version of Array. Only [...]
src/Classes/SendMail.php
Outdated
| $message = ArrayHelper::getIfSet($_POST, 'message', ''); | ||
| if ($fromEmail == '' || $from == '' || $message == '') { | ||
| Notification::pushFlashMessage( | ||
| array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice, but can you use short version of Array. Only [...]
src/Classes/SendMail.php
Outdated
| if ($fromEmail == '' || $from == '' || $message == '') { | ||
| Notification::pushFlashMessage( | ||
| array( | ||
| "text" => "Warnung: Felder können nicht leer gelassen werden.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use ö because we use UTF8. 😊
src/Classes/SendMail.php
Outdated
| $message .= 'PHP version: ' . phpversion() . '<br />'; | ||
| $headers[] = 'MIME-Version: 1.0'; | ||
| $headers[] = 'Content-type: text/html; charset=iso-8859-1'; | ||
| $headers[] = 'From: '.$from.' <'.$fromEmail.'>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you put a space before and after the . (Dot) operator 😊
fix: changed array to short version fix: added space before / after dot operator
RobinTheHood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like your changes. Thank you. I have found only one little note. 😊
src/Templates/ReportProblem.tmpl.php
Outdated
| <?php | ||
| if (isset($_POST['send_mail'])) { | ||
| SendMail::sendFeedback(); | ||
| } ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you put logical code (line 3-8) in the your new Methode invokeReportProblem () in IndexController. I know that the IndexController has to much code. In the future we can split up the IndexController in Multiple Controllers. 😊
|
Maybe we can add the Domain to the E-Mail. 🤓🤔❓😊 |
fix: move logical code from template to controller fix: changed charset for mail
|
I'm finished with changes, I hope you like it 😄 |
RobinTheHood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very nice. Thank you very much. I like it. 👌🏻🤓🎉
No description provided.