.NET Components for Mobility

can't send an email

Last post 07-31-2008 6:30 AM by hibbert.de. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-30-2008 10:32 AM

    can't send an email

    hello,

     i try to send an email this way:

     Dim em As New EmailMessage()
     txt = "myText"

     em.To.Add(New Recipient(email))
     em.Subject = "subj"
     em.BodyText = txt + Chr(13) + Chr(10) + Chr(13) + Chr(10)
     em.Send(os.EmailAccounts(0))

    But the email isn't send, it is stored in the "entwürfe" (templates) folder, but there is no suject, no recepent and no bodytext...

     why?

     

    i'm using a windows mobile 6.0 and ITH 3.2

     

    thanks hibbert.de 

     

    sorry for my bad english
  • 07-31-2008 3:16 AM In reply to

    Re: can't send an email

    Depending on the account type the message will not necessarily be sent immediately but will be placed in the Outbox - you can force a send/receive with MessagingApplication.Synchronize(). Can you send me a screenshot showing the message with none of the properties set? Also could you upgrade to the latest version - 3.3 and see if this fixes the problem. The download is in the same folder as the previous 3.x releases.

    Peter

    Peter Foot
    Microsoft Device Application Development MVP
    www.peterfoot.net | www.inthehand.com
  • 07-31-2008 5:56 AM In reply to

    Re: can't send an email

     hi peter,

    i use MessagingApplication.Synchronize(), but teh mail ist stored in the drafts folder, but with no subject, bodytext etc.

    i will try the version 3.3, so just wait 20 minutes ;)

     

    hibbert.de 

    sorry for my bad english
  • 07-31-2008 6:30 AM In reply to

    Re: can't send an email

    ok, i have installed the latest version, but it's always the same:

    sometime the is send, sometime not, but everytimes there is a new mail in the drafts folder, without subject and bodytext.

    Imports InTheHand.WindowsMobile.PocketOutlook
    Public Class tMailIt
        Private caption As String
        Private body As String
        Private mail As String
        Public Property beteff() As String
            Get
                Return caption
            End Get
            Set(ByVal Value As String)
                caption = Value
            End Set
        End Property

        Public Property bodyText() As String
            Get
                Return body
            End Get
            Set(ByVal Value As String)
                body = Value
            End Set
        End Property

        Public Property empfaenger() As String
            Get
                Return mail
            End Get
            Set(ByVal Value As String)
                mail = Value
            End Set
        End Property

        Public Sub send()
            Dim os As New OutlookSession
            Dim em As New EmailMessage
            em.Subject = caption
            em.BodyText = body
            em.To.Add(New Recipient(mail))
            em.Send(os.EmailAccounts(0))
            Application.DoEvents()
            MessagingApplication.Synchronize("ActiveSync")
            Application.DoEvents()
            os.Dispose()
        End Sub

    maybe you can see what's wrong ;)

     

    hibbert.de 


    sorry for my bad english
Page 1 of 1 (4 items)
Copyright © 2001-2008 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.