Anyone know how to customize an alert using the sendmail command? I am having trouble getting an email to work off an alert

.
Any advice would be appreciated.
if(current_dirction != last_direction)
{
Alert ("EMA/SMA Cross for "+Symbol()+" on the "+Period()+" minute chart.");
last_direction = current_dirction;
return (true);
}
else
{
return (false);
}