List Info

Thread: Sending email




Sending email
user name
2006-11-29 07:34:35
here's my code:

        Try
            Dim Email As New System.Web.Mail.MailMessage
            Email.To = "rapa-apXXXXX.com"
            Email.From = "eresurreccionXXXXX.com"
            Email.Subject = "test email"
            Email.Body = "testing lng po - windows
based"
            System.Web.Mail.SmtpMail.SmtpServer =
"192.xxx.xx.xxx"
            System.Web.Mail.SmtpMail.Send(Email)
            MessageBox.Show(Me, "no error
occured")
        Catch ex As Exception
            MessageBox.Show(Me, "error occured")
        End Try

I tried to run this and its working fine
but when i tried to replace
            System.Web.Mail.SmtpMail.SmtpServer =
"192.xxx.xx.xxx"
with 
            System.Web.Mail.SmtpMail.SmtpServer =
"202.xxx.xx.xxx"

i catches an exception

so i experiment with
by replacing 
            Email.To = "rapa-apXXXXX.com"
            Email.From = "eresurreccionXXXXX.com"
to

            Email.To = "rapa-apothersite.com"
            Email.From = "eresurreccionmysite.com"

but still returns an error
	Message	"Could not access 'CDO.Message' object."

how come that first code works and if i changed its from and
to nor
SMTPserver it returns a CDO error?




--- In AspNetAnyQuestionIsOk@yahoogroups.com, "Jeffrey
Jarin"
<jeff_jarin...> wrote:
>
> Good day to all! 
> I'm looking forward for your help in making my web
application work, i
> have a simple web application that needs a feed back
for problem is i
> dont know how to program when sending email, i tried to
google it and
> got some answer but although i tried to supply all
necessary fields
> like from, to, mail server (which is mail.example.com)
i cant send an
> email.
> i tried some of my friends mailserver it work once when
i supply the
> ff values like
> From: one...
> To: me...
> mailserver: mail.friends.com
> 
> I noticed when i tried to changed the values of to and
from it never
> send ana email but returned me a cdo error, i find this
odd since it
> should send to other email addresses like yahoo.com
right?
> 
> my friend said that probably the mail server of
example.com is not yet
> opened or probably needs a password, but using a web
based email
> account i can send an email using superman... to
batman...
> 
> anything i missed?
> 
> Thanks in advance for all answer.
>




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/join

    (Yahoo! ID required)

<*> To change settings via email:
    mailto:AspNetAnyQuestionIsOk-digest@yahoogroups.com 
   
mailto:AspNetAnyQuestionIsOk-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )