sending mail

sending mail

by batoul alsh -
Number of replies: 2

please help me that when i use function (mail_to_user) :

$body = "Hi User<br/><br/>"."You have been enrolled to course"." ".$course->fullname ." "."Please login to start your course."." ".$courselink." "."<br/><br/>"."Thanks,"."<br/>Admin";

email_to_user($user,$USER,'Enrollment Notification','The text of the message',$body);

 the mail was received contain "The text of the message"  not ($body ).

many thanks.


Average of ratings: -
In reply to batoul alsh

Re: sending mail

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers

This isn’t an issue with Moodle’s Forum activity, which this particular forum is about.

But Moodle already has that code built in - it sends a welcome email on self enrolment...