Xtreme .Net Talk
Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Registered members
Current visitors
New profile posts
Search profile posts
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Xtreme .Net Talk
.NET
Network
"Could not access 'CDO.Message' object."?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Barry" data-source="post: 394044" data-attributes="member: 30457"><p>Ensure that you have correctly formed email addresses. For example:</p><p></p><p>Dim mMessage As New MailMessage</p><p>With mMessage</p><p> .From = "Automated Mail"</p><p> .To = "you@yourhouse.com"</p><p>End With</p><p></p><p>will result in >> Could not access 'CDO.Message' object.</p><p></p><p>(InnerException.Message)</p><p>The server rejected the sender address. The server response was: 553 malformed address: <Automated Mail></p><p></p><p>removing the space, in this instance, from the .From property will resolve the error.</p><p></p><p>Imports System.Web.mail</p><p></p><p>Sub sendmail()</p><p></p><p> Dim mMessage As New MailMessage</p><p> With mMessage</p><p> .From = "AutomatedMail"</p><p> .To = "you@yourhouse.com"</p><p> End With</p><p></p><p> SmtpMail.SmtpServer = "[servername]"</p><p> SmtpMail.Send(mailMsg)</p><p></p><p>End Sub</p><p></p><p></p><p>Note: some email servers will have policy restrictions applied to them to prevent spam, e.g. mail may only be allowed to go external if its origin is safe.</p></blockquote><p></p>
[QUOTE="Barry, post: 394044, member: 30457"] Ensure that you have correctly formed email addresses. For example: Dim mMessage As New MailMessage With mMessage .From = "Automated Mail" .To = "you@yourhouse.com" End With will result in >> Could not access 'CDO.Message' object. (InnerException.Message) The server rejected the sender address. The server response was: 553 malformed address: <Automated Mail> removing the space, in this instance, from the .From property will resolve the error. Imports System.Web.mail Sub sendmail() Dim mMessage As New MailMessage With mMessage .From = "AutomatedMail" .To = "you@yourhouse.com" End With SmtpMail.SmtpServer = "[servername]" SmtpMail.Send(mailMsg) End Sub Note: some email servers will have policy restrictions applied to them to prevent spam, e.g. mail may only be allowed to go external if its origin is safe. [/QUOTE]
Insert quotes…
Verification
Post reply
.NET
Network
"Could not access 'CDO.Message' object."?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom