Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Mirko C
7,865 PointsPHP Mail Form not working =(
Hey =)!
Is it possible to make a SIMPLE formmailer work in the treehouse workspace without installing anything else?
Ive tried 8 versions now of mail former tutorials and templates and what not, none of them is sending a mail, when i try from the treehouse workspace.
is treehouse compatible with the mailto thing or do i have to do it on another webserver? i would be rly rly thankful to get this work. Thank you
Mirko
1 Answer
Ted Sumner
Courses Plus Student 17,967 PointsWorkspaces is configured to not allow email to be send from it. Local environments can be configured to send email, but are not typically so configured. For example, I could not make the email feature work from my local environment when doing the Slim course, but it worked fine on a live server.
Mirko C
7,865 Pointswow Ted Sumner thank you so much! I tried to figure out whats wrong but now i got it, thanks to you!
blessings
Mirko C
7,865 PointsMirko C
7,865 PointsPHP for mail.php was this
<?php $empfaenger = "empf@domain.de"; $betreff = "Die Mail-Funktion"; $from = "From: Nils Reimers absender@domain.de\n"; $from .= "Reply-To: absender@domain.de\n"; $from .= "Content-Type: text/html\n"; $text = "Hier lernt Ihr, wie man mit <b>PHP</b> Mails verschickt";
mail($empfaenger, $betreff, $text, $from); ?>+
i changed $empfaenger to my mail and that should be it right?