<p>Untitled Document <!--
.style1 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style2 {font-size: 12px}
.style3 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; }
.style4 {font-size: 12}
-->
<script type="text/javascript"></script>
</p>
<p><span class="style1"><span class="style2"><span class="style4"><span class="style2"><strong>MCR6: mcr6_en_us.php How to send an E-mail using the macro sc_mail_send</strong><strong> </strong><br /><br /><strong>Application Name: </strong>mcr6_mail_send<br /><strong>Description: </strong>Control Form using macro to send email.<br /></span><span class="style4"><span class="style6"><span class="style8"><span class="style6"><strong><span class="style1"><span class="style2"><span class="style4"><span class="style2"><strong>Fields that will be shown in the control</strong></span></span></span></span>:</strong> </span></span></span></span><span class="style2"><br />name, user, password, email_origin, email_destination, subject, message</span></span></span></span></p>
<table border="1" cellspacing="0" width="80%" bordercolor="#666666">
<tbody>
<tr>
<td class="style3" width="188"><strong>Event:</strong></td>
<td class="style3" width="380">onValidate</td>
</tr>
<tr>
<td class="style3">
<p><strong>Code:</strong></p>
</td>
<td class="style3">
<p>$smtp = "smtp.gmail.com";</p>
<p>$name={name};</p>
<p>$subject={subject};</p>
<p>$description={message};</p>
<p>$body = "<strong>Name:</strong> ".$name."<br />"."<strong>Subject:</strong> ".$subject."<br /><br />".$description;</p>
<p>sc_mail_send($smtp,{user},{password},{email_origin},{email_destination},$subject,$body,"H",,,"465","S",);</p>
<p>if ({sc_mail_ok}){<br />sc_alert("Email successful sended!");</p>
<p>}else{<br />sc_error_message({sc_mail_erro});<br />}</p>
</td>
</tr>
</tbody>
</table>