Solved

cdo problem with sending email

Posted on 2004-10-25
240 Views
Last Modified: 2010-04-24
i am trying to set some of the settings in an email such as priority and xmailer etc...

in the code below if i comment out the botton 3 lines it works fine

trying to do any of the bottom 3 lines give error...

how are the bottom 3 line done whast the code to do them..i belive there wrong

                .Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "0") 'basic authentication 1
                .Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "xxx@xxxx.com") 'set your username here
                .Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "xxxx") 'set your password here
                .Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout", "240")
                '.Fields.Add("urn:schemas:mailheader:comment").value = "Welcome Msg Sent From ArgoDragon E-Mail Manager"
                '.Fields.Add("urn:schemas:mailheader:x-mailer").value = "VB.net 2005 - ArgoDragon E-Mail Manager"
                '.Fields.Add("urn:schemas:httpmail:importance").value = 2


thx
Johnny
aka Pern
0
Question by:Johnny
    7 Comments
     
    LVL 6

    Assisted Solution

    by:etmendz
    I think the urn:... syntax are for MS Exchange Store, OWA or WebDAV. Are you targetting an MS Exchange Server?
    0
     
    LVL 11

    Assisted Solution

    by:ajaikumarr
    0
     
    LVL 4

    Assisted Solution

    by:Glom
    Hi,

    Put a try-catch directive between your 3 lines that give the error
    and use the innerexception to see what really happens

    Try
        .Fields.Add("urn:schemas:mailheader:comment").value = "Welcome Msg Sent From ArgoDragon E-Mail Manager"
    Catch(ex as Exception)
        MessageBox.Show(ex.InnerException.InnerException.ToString())
    End Try

    Glom
    0
     
    LVL 6

    Accepted Solution

    by:
    I did some reading and it seems that the urn:schemas syntax are taken from standards. So my guess is you cannot Fields.Add them anymore. Try treating them as existing fields instead. Say:

     .Fields.Item("urn:schemas:mailheader:comment") = "Welcome Msg Sent From ArgoDragon E-Mail Manager"

    Have fun.
    0
     

    Author Comment

    by:Johnny
    ok i found the urn fields have to have item as the statement...

    i font get errors now but i do not get it to display either..is there a way to control inportance,priority and xmailer etc fields other then cdo...
    and thx how to give points ill take sugestions...

    0
     

    Author Comment

    by:Johnny
    whats fair to award oints to who and how meny... any sugestions?

    thx
    0
     

    Author Comment

    by:Johnny
    i guess it wont work so i devided the point as i used um...

    its not gonna work..wish there was a way!!

    php does it fine..so go figure there not in microsoft at all

    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Product Review - Android Remix

    Come along for the ride with our Senior Product Manager, Brian Matis, as he reviews the Android Remix.

    Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    This video Micro Tutorial is the second in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles a…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    913 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now