I meant to say <i>I will just include the &#39;cc&#39; address within the &#39;to&#39; element.</i><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup {  position:absolute;  z-index:9999;  padding: 0px 0px;  margin-left: 0px;  margin-top: 0px;  width: 240px;  overflow: hidden;  word-wrap: break-word;  color: black;  font-size: 10px;  text-align: left;  line-height: 13px;}</style><br>
<br><div class="gmail_quote">On Thu, Mar 31, 2011 at 9:51 AM, John Mitchell <span dir="ltr">&lt;<a href="mailto:mitchelljj98@gmail.com">mitchelljj98@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Adding the &#39;from&#39; element worked.  I tried adding a &#39;cc&#39; element and the email was sent but it did not send it to the &#39;cc&#39; address.  For now I will just include the &#39;cc&#39; address within the &#39;from&#39; element.<div>
<div></div><div class="h5"><br>
<div style="display: inline;"></div><br>
<div class="gmail_quote">On Thu, Mar 31, 2011 at 8:27 AM, Earnie Boyd <span dir="ltr">&lt;<a href="mailto:earnie@users.sourceforge.net" target="_blank">earnie@users.sourceforge.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div>John Mitchell wrote:<br>
&gt; Also I forgot to mention below that this is on drupal 6.<br>
&gt;<br>
&gt; On Thu, Mar 31, 2011 at 6:44 AM, John Mitchell &lt;<a href="mailto:mitchelljj98@gmail.com" target="_blank">mitchelljj98@gmail.com</a>&gt;wrote:<br>
&gt;<br>
&gt;&gt; Within a custom module I am trying to send the below so that an email is<br>
&gt;&gt; sent but I get the error *The submitted from address () is not valid.*<br>
&gt;&gt; This *from *email address does exist so why is it giving me this error?<br>
&gt;&gt;<br>
<br>
</div>You&#39;re missing the &#39;from&#39; element in the message.  But you shouldn&#39;t be<br>
using drupal_mail_send directly.  You should use drupal_mail[1] and<br>
implement hook_mail[2] to add your subject and body to the message array.<br>
<br>
&gt;&gt; $message = array(<br>
     &#39;from&#39; =&gt; &#39;<a href="mailto:support@domain123.com" target="_blank">support@domain123.com</a>&#39;,<br>
<div>&gt;&gt;   &#39;to&#39; =&gt; &#39;<a href="mailto:username1@domain123.com" target="_blank">username1@domain123.com</a>&#39;,<br>
&gt;&gt;   &#39;subject&#39; =&gt; t(&#39;Example subject&#39;),<br>
&gt;&gt;   &#39;body&#39; =&gt; t(&#39;Example body&#39;),<br>
&gt;&gt;   &#39;headers&#39; =&gt; array(&#39;From&#39; =&gt; &#39;<a href="mailto:support@domain123.com" target="_blank">support@domain123.com</a>&#39;),<br>
&gt;&gt; );<br>
&gt;&gt; drupal_mail_send($message);<br>
<br>
</div>[1]<br>
<a href="http://api.drupal.org/api/drupal/includes--mail.inc/function/drupal_mail/6" target="_blank">http://api.drupal.org/api/drupal/includes--mail.inc/function/drupal_mail/6</a><br>
[2]<br>
<a href="http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_mail/6" target="_blank">http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_mail/6</a><br>
<br>
--<br>
Earnie<br>
-- <a href="http://progw.com" target="_blank">http://progw.com</a><br>
-- <a href="http://www.for-my-kids.com" target="_blank">http://www.for-my-kids.com</a><br>
<font color="#888888">--<br>
</font><div><div></div><div>[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</div></div></blockquote></div><br><br clear="all"><br></div></div><font color="#888888">-- <br>John J. Mitchell<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>John J. Mitchell<br>