I think the email_example in the Examples project demonstrates this, but I&#39;m not sure.<br><br><a href="http://drupal.org/project/examples">http://drupal.org/project/examples</a><br><br>-Randy<br><br><div class="gmail_quote">
On Thu, Jul 21, 2011 at 7:29 AM, Reka Sandaruwan <span dir="ltr">&lt;<a href="mailto:rekasandaruwan@gmail.com">rekasandaruwan@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I want to sent mail using drupal mail api. i can send mail using
    sender mail as site mail , no problem it is working.<br>
    &lt;&lt;  $site_mail = variable_get(&#39;site_mail&#39;,
    ini_get(&#39;sendmail_from&#39;));<br>
            $from = $site_mail;<br>
            drupal_mail($module, $key, $to, $language, $params, $from,
    TRUE);   &gt;&gt;<br>
    <br>
    <font color="#ff0000">But I want to send mail using sender mail as
      different one (custom mail address), at this point mail did not
      send<br>
      &lt;&lt;  $site_mail = <a href="mailto:sjrooms@olsen.tdcadsl.dk" target="_blank">&quot;sjrooms@olsen.tdcadsl.dk&quot;</a>;</font><br>
            $from = $site_mail;<br>
            drupal_mail($module, $key, $to, $language, $params, $from,
    TRUE);   &gt;&gt;<br>
    <br>
    I cant understand this problem. what can I do for this?.<br>
    <br>
    <br>
    I have another problem, is our mail server block send mail to
    multiple revisers because i cant same send mail to 2 revisers.<br>
    &lt;&lt;  $site_mail = variable_get(&#39;site_mail&#39;,
    ini_get(&#39;sendmail_from&#39;));<br>
           $user_mail = $form[&#39;contact_form&#39;][&quot;email&quot;][&#39;#value&#39;]; <br>
           $to = $user_mail.&quot;,&quot;.$site_mail;<br>
           drupal_mail($module, $key, $to, $language, $params, $from,
    TRUE);   &gt;&gt;<br>
    <br>
    &quot;I was try as :<br>
                    $to
    The e-mail address or addresses where the message will be sent to.
    The
    formatting of this string must comply with RFC 2822.      Some 
    examples are:
    <ul><li><a href="mailto:user@example.com" target="_blank">user@example.com</a>
      </li><li><a href="mailto:user@example.com" target="_blank">user@example.com</a>, <a href="mailto:anotheruser@example.com" target="_blank">anotheruser@example.com</a>
      </li><li>User <a href="mailto:user@example.com" target="_blank">&lt;user@example.com&gt;</a>
      </li><li>User <a href="mailto:user@example.com" target="_blank">&lt;user@example.com&gt;</a>, Another User
        <a href="mailto:anotheruser@example.com" target="_blank">&lt;anotheruser@example.com&gt;</a>  &quot;
      </li></ul>
    <br>
    <b>I was followed the following guide</b>. <br>
    <a href="http://api.drupal.org/api/drupal/includes--form.inc/group/form_api/7" target="_blank">http://api.drupal.org/api/drupal/includes--form.inc/group/form_api/7</a><br>
<a href="http://api.drupal.org/api/drupal/includes--mail.inc/function/drupal_mail/7" target="_blank">http://api.drupal.org/api/drupal/includes--mail.inc/function/drupal_mail/7</a>
    <br clear="all"><font color="#888888"><br>-- <br>Sandaruwan<br><a href="http://openmindsl.wordpress.com" target="_blank">http://openmindsl.wordpress.com</a> <br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Randy Fay<br>Drupal Module and Site Development<br><a href="mailto:randy@randyfay.com">randy@randyfay.com</a><br>+1  970.462.7450<br><br>