|
-
Dec 1st, 2008, 11:31 AM
#1
Thread Starter
Member
email smtp
i have got error message when i debugging it,,
ERROR message : Nullreferenceexception
what is wrong with my code??
my code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim message As New EmailMessage
message.Subject = "test email"
message.BodyText = " test done"
Dim client As New Recipient("ABC", "[email protected]")
message.To.Add(client)
Dim emailsession As New OutlookSession
emailsession.EmailAccounts("Gmail").Send(message)'<<<error here
MsgBox("email sent")
End Sub
Last edited by husky_doggy; Dec 1st, 2008 at 01:54 PM.
-
Dec 2nd, 2008, 02:05 AM
#2
Frenzied Member
Re: email smtp
Hi,
not used it, but are you sure 'OutlookSession' is correct - should it not be pocketoutlook or similar???
-
Dec 2nd, 2008, 10:43 AM
#3
Thread Starter
Member
Re: email smtp
 Originally Posted by petevick
Hi,
not used it, but are you sure 'OutlookSession' is correct - should it not be pocketoutlook or similar???
ok...it is fixed now..it was the account name
but i have another queston..
i was just testing if the code works...so now it works and show the message to inform user " email sent" when i debug it on my phone.
what i want to know is ...is that just a simulation and i wont receive an actual email for it? ( because i didnt receive anything, but the inform message was display), and i am sync'ing with the pc with internet access.
or i should receive the email???
Last edited by husky_doggy; Dec 2nd, 2008 at 11:12 AM.
-
Dec 2nd, 2008, 06:06 PM
#4
Frenzied Member
Re: email smtp
Can you send an email from your phone using that account by using the 'normal' messaging?
-
Dec 5th, 2008, 09:33 AM
#5
Thread Starter
Member
Re: email smtp
 Originally Posted by petevick
Can you send an email from your phone using that account by using the 'normal' messaging?
yes i can , but once i use usb to sync to debug my application..it cant send email..but can still go on internet.
actually i think it is while within the application i can not send email at all..
and i found out that if i send an email within in the program ..the next time i uses 3G to go on internet to download the emails those email i "sent" in the application days ago only get send by then..
Last edited by husky_doggy; Dec 5th, 2008 at 09:41 AM.
-
Dec 5th, 2008, 09:50 AM
#6
Frenzied Member
Re: email smtp
What happens if you make an internet connection, and then send your email?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|