Wats the error in this code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rajani

    Wats the error in this code

    Hello,

    dim receiptto
    receiptto="a2z@ yahoo.com"
    set cdoconfig=Creat eObject("CDO.co nfiguration")
    set cdomsg=CreateOb ject("CDO.Messa ge")

    with cdoconfig.Field s
    .Item("http://schemas.microso ft.com/cdo/configuration/sendusing")=2

    ..Item("http://schemas.microso ft.com/cdo/configuration/smtpserver")="m ail8.webmail.co m"

    'this is the SMTP server setting in my outlook.

    .Update
    end with
    with cdomsg
    set .Configuration= cdoconfig

    ..Fields("urn:s chemas:mailhead er:disposition-notification-to")=receiptt o
    .Fields("urn:sc hemas:mailheade r:return-receipt-to") =receiptto
    .From="a2zwd@ya hoo.com"
    .To="mymail@yah oo.com"
    .Subject="Sampl e mail"
    .HTMLBody="<b>< font color=#ff0000 size=3
    face='arial'>He llo</font></b>"
    .DSNOptions=4
    .Fields.update
    .Send
    end with
    set cdoconfig=nothi ng
    set cdomsg=nothing


    Response.Write "Mail sent"


    I am getting the error ar .Send (Internal Server error 500
    If i didnt use configuration, sending mail correctly. (Simple from, to,
    subject, htmlbody, send).


    Thanx in advance
  • Jason Brown [MSFT]

    #2
    Re: Wats the error in this code

    Turn off friendly error messages in your browser




    --
    Jason Brown
    Microsoft GTSC, IIS

    This posting is provided "AS IS" with no warranties, and confers no
    rights.


    "Rajani" <Rajani@discuss ions.microsoft. com> wrote in message
    news:B17791C2-D4FA-45BC-B3CA-CFF9CFA44AF5@mi crosoft.com...[color=blue]
    > Hello,
    >
    > dim receiptto
    > receiptto="a2z@ yahoo.com"
    > set cdoconfig=Creat eObject("CDO.co nfiguration")
    > set cdomsg=CreateOb ject("CDO.Messa ge")
    >
    > with cdoconfig.Field s
    > .Item("http://schemas.microso ft.com/cdo/configuration/sendusing")=2
    >
    > .Item("http://schemas.microso ft.com/cdo/configuration/smtpserver")="m ail8.webmail.co m"
    >
    > 'this is the SMTP server setting in my outlook.
    >
    > .Update
    > end with
    > with cdomsg
    > set .Configuration= cdoconfig
    >
    > .Fields("urn:sc hemas:mailheade r:disposition-notification-to")=receiptt o
    > .Fields("urn:sc hemas:mailheade r:return-receipt-to") =receiptto
    > .From="a2zwd@ya hoo.com"
    > .To="mymail@yah oo.com"
    > .Subject="Sampl e mail"
    > .HTMLBody="<b>< font color=#ff0000 size=3
    > face='arial'>He llo</font></b>"
    > .DSNOptions=4
    > .Fields.update
    > .Send
    > end with
    > set cdoconfig=nothi ng
    > set cdomsg=nothing
    >
    >
    > Response.Write "Mail sent"
    >
    >
    > I am getting the error ar .Send (Internal Server error 500
    > If i didnt use configuration, sending mail correctly. (Simple from, to,
    > subject, htmlbody, send).
    >
    >
    > Thanx in advance[/color]


    Comment

    • Aaron [SQL Server MVP]

      #3
      Re: Wats the error in this code

      Is that Atrax?






      "Jason Brown [MSFT]" <i-brjaso@online.m icrosoft.com> wrote in message
      news:eiiwqIS0EH A.3468@TK2MSFTN GP14.phx.gbl...[color=blue]
      > Turn off friendly error messages in your browser
      >
      > http://support.microsoft.com/default...;en-us;Q294807[/color]


      Comment

      • Aaron [SQL Server MVP]

        #4
        Re: Wats the error in this code

        Might try this code:


        --
        Please contact this domain's administrator as their DNS Made Easy services have expired.

        (Reverse address to reply.)




        "Rajani" <Rajani@discuss ions.microsoft. com> wrote in message
        news:B17791C2-D4FA-45BC-B3CA-CFF9CFA44AF5@mi crosoft.com...[color=blue]
        > Hello,
        >
        > dim receiptto
        > receiptto="a2z@ yahoo.com"
        > set cdoconfig=Creat eObject("CDO.co nfiguration")
        > set cdomsg=CreateOb ject("CDO.Messa ge")
        >
        > with cdoconfig.Field s
        >[/color]
        ..Item("http://schemas.microso ft.com/cdo/configuration/sendusing")=2[color=blue]
        >
        >[/color]
        ..Item("http://schemas.microso ft.com/cdo/configuration/smtpserver")="m ail8.we
        bmail.com"[color=blue]
        >
        > 'this is the SMTP server setting in my outlook.
        >
        > .Update
        > end with
        > with cdomsg
        > set .Configuration= cdoconfig
        >
        > .Fields("urn:sc hemas:mailheade r:disposition-notification-to")=receiptt o
        > .Fields("urn:sc hemas:mailheade r:return-receipt-to") =receiptto
        > .From="a2zwd@ya hoo.com"
        > .To="mymail@yah oo.com"
        > .Subject="Sampl e mail"
        > .HTMLBody="<b>< font color=#ff0000 size=3
        > face='arial'>He llo</font></b>"
        > .DSNOptions=4
        > .Fields.update
        > .Send
        > end with
        > set cdoconfig=nothi ng
        > set cdomsg=nothing
        >
        >
        > Response.Write "Mail sent"
        >
        >
        > I am getting the error ar .Send (Internal Server error 500
        > If i didnt use configuration, sending mail correctly. (Simple from, to,
        > subject, htmlbody, send).
        >
        >
        > Thanx in advance[/color]


        Comment

        • Rajani

          #5
          Re: Wats the error in this code

          Hello,

          I off friendly error messages in the browser. Still the same
          error(screen). I copied from that article only and changed values to suit my
          requirements. If i didnt use configuration, its sending mail w/o error. When
          i use config only its displaying error.



          "Aaron [SQL Server MVP]" wrote:
          [color=blue]
          > Might try this code:
          > http://www.aspfaq.com/2252
          >
          > --
          > http://www.aspfaq.com/
          > (Reverse address to reply.)
          >
          >
          >
          >
          > "Rajani" <Rajani@discuss ions.microsoft. com> wrote in message
          > news:B17791C2-D4FA-45BC-B3CA-CFF9CFA44AF5@mi crosoft.com...[color=green]
          > > Hello,
          > >
          > > dim receiptto
          > > receiptto="a2z@ yahoo.com"
          > > set cdoconfig=Creat eObject("CDO.co nfiguration")
          > > set cdomsg=CreateOb ject("CDO.Messa ge")
          > >
          > > with cdoconfig.Field s
          > >[/color]
          > ..Item("http://schemas.microso ft.com/cdo/configuration/sendusing")=2[color=green]
          > >
          > >[/color]
          > ..Item("http://schemas.microso ft.com/cdo/configuration/smtpserver")="m ail8.we
          > bmail.com"[color=green]
          > >
          > > 'this is the SMTP server setting in my outlook.
          > >
          > > .Update
          > > end with
          > > with cdomsg
          > > set .Configuration= cdoconfig
          > >
          > > .Fields("urn:sc hemas:mailheade r:disposition-notification-to")=receiptt o
          > > .Fields("urn:sc hemas:mailheade r:return-receipt-to") =receiptto
          > > .From="a2zwd@ya hoo.com"
          > > .To="mymail@yah oo.com"
          > > .Subject="Sampl e mail"
          > > .HTMLBody="<b>< font color=#ff0000 size=3
          > > face='arial'>He llo</font></b>"
          > > .DSNOptions=4
          > > .Fields.update
          > > .Send
          > > end with
          > > set cdoconfig=nothi ng
          > > set cdomsg=nothing
          > >
          > >
          > > Response.Write "Mail sent"
          > >
          > >
          > > I am getting the error ar .Send (Internal Server error 500
          > > If i didnt use configuration, sending mail correctly. (Simple from, to,
          > > subject, htmlbody, send).
          > >
          > >
          > > Thanx in advance[/color]
          >
          >
          >[/color]

          Comment

          • Jason Brown [MSFT]

            #6
            Re: Wats the error in this code

            yeah mate.


            --
            Jason Brown
            Microsoft GTSC, IIS

            This posting is provided "AS IS" with no warranties, and confers no
            rights.

            "Aaron [SQL Server MVP]" <ten.xoc@dnartr eb.noraa> wrote in message
            news:%23I38tSS0 EHA.3408@tk2msf tngp13.phx.gbl. ..[color=blue]
            > Is that Atrax?
            >
            >
            >
            >
            >
            >
            > "Jason Brown [MSFT]" <i-brjaso@online.m icrosoft.com> wrote in message
            > news:eiiwqIS0EH A.3468@TK2MSFTN GP14.phx.gbl...[color=green]
            >> Turn off friendly error messages in your browser
            >>
            >> http://support.microsoft.com/default...;en-us;Q294807[/color]
            >
            >[/color]


            Comment

            • Jeff Cochran

              #7
              Re: Wats the error in this code

              On Mon, 22 Nov 2004 22:37:15 -0800, Rajani
              <Rajani@discuss ions.microsoft. com> wrote:
              [color=blue]
              > I off friendly error messages in the browser. Still the same
              >error(screen ). I copied from that article only and changed values to suit my
              >requirements . If i didnt use configuration, its sending mail w/o error. When
              >i use config only its displaying error.[/color]

              Post the full error message as you see it. If it works without the
              config, then you have something wrong in your config settings. You
              did edit the code to match your SMTP server, correct?

              Jeff

              [color=blue]
              >"Aaron [SQL Server MVP]" wrote:
              >[color=green]
              >> Might try this code:
              >> http://www.aspfaq.com/2252
              >>
              >> --
              >> http://www.aspfaq.com/
              >> (Reverse address to reply.)
              >>
              >>
              >>
              >>
              >> "Rajani" <Rajani@discuss ions.microsoft. com> wrote in message
              >> news:B17791C2-D4FA-45BC-B3CA-CFF9CFA44AF5@mi crosoft.com...[color=darkred]
              >> > Hello,
              >> >
              >> > dim receiptto
              >> > receiptto="a2z@ yahoo.com"
              >> > set cdoconfig=Creat eObject("CDO.co nfiguration")
              >> > set cdomsg=CreateOb ject("CDO.Messa ge")
              >> >
              >> > with cdoconfig.Field s
              >> >[/color]
              >> ..Item("http://schemas.microso ft.com/cdo/configuration/sendusing")=2[color=darkred]
              >> >
              >> >[/color]
              >> ..Item("http://schemas.microso ft.com/cdo/configuration/smtpserver")="m ail8.we
              >> bmail.com"[color=darkred]
              >> >
              >> > 'this is the SMTP server setting in my outlook.
              >> >
              >> > .Update
              >> > end with
              >> > with cdomsg
              >> > set .Configuration= cdoconfig
              >> >
              >> > .Fields("urn:sc hemas:mailheade r:disposition-notification-to")=receiptt o
              >> > .Fields("urn:sc hemas:mailheade r:return-receipt-to") =receiptto
              >> > .From="a2zwd@ya hoo.com"
              >> > .To="mymail@yah oo.com"
              >> > .Subject="Sampl e mail"
              >> > .HTMLBody="<b>< font color=#ff0000 size=3
              >> > face='arial'>He llo</font></b>"
              >> > .DSNOptions=4
              >> > .Fields.update
              >> > .Send
              >> > end with
              >> > set cdoconfig=nothi ng
              >> > set cdomsg=nothing
              >> >
              >> >
              >> > Response.Write "Mail sent"
              >> >
              >> >
              >> > I am getting the error ar .Send (Internal Server error 500
              >> > If i didnt use configuration, sending mail correctly. (Simple from, to,
              >> > subject, htmlbody, send).
              >> >
              >> >
              >> > Thanx in advance[/color]
              >>
              >>
              >>[/color][/color]

              Comment

              • Rajani

                #8
                Re: Wats the error in this code

                This is the code i used
                dim receiptto
                receiptto="raja ni@tom.com.bn"
                set cdoconfig=Creat eObject("CDO.co nfiguration")
                set cdomsg=CreateOb ject("CDO.Messa ge")

                with cdoconfig.Field s
                ' .Item("http://schemas.microso ft.com/cdo/configuration/sendusing")=2
                ' .Item("http://schemas.microso ft.com/cdo/configuration/smtpserver")="m ail4.webindia.c om"
                ' .Update
                end with
                with cdomsg
                ' set .Configuration= cdoconfig
                .Fields("urn:sc hemas:mailheade r:disposition-notification-to")=receiptt o
                .Fields("urn:sc hemas:mailheade r:return-receipt-to") =receiptto
                .From="a2zwd@ya hoo.com"
                .To="rajani@tom .com.bn"
                .Subject="Sampl e mail"
                .HTMLBody="<b>< font color=#ff0000 size=3 face='arial'>He llo</font></b>"
                .DSNOptions=4
                .Fields.update
                .Send
                end with
                set cdoconfig=nothi ng
                set cdomsg=nothing






                "Jeff Cochran" wrote:
                [color=blue]
                > On Mon, 22 Nov 2004 22:37:15 -0800, Rajani
                > <Rajani@discuss ions.microsoft. com> wrote:
                >[color=green]
                > > I off friendly error messages in the browser. Still the same
                > >error(screen ). I copied from that article only and changed values to suit my
                > >requirements . If i didnt use configuration, its sending mail w/o error. When
                > >i use config only its displaying error.[/color]
                >
                > Post the full error message as you see it. If it works without the
                > config, then you have something wrong in your config settings. You
                > did edit the code to match your SMTP server, correct?
                >
                > Jeff
                >
                >[color=green]
                > >"Aaron [SQL Server MVP]" wrote:
                > >[color=darkred]
                > >> Might try this code:
                > >> http://www.aspfaq.com/2252
                > >>
                > >> --
                > >> http://www.aspfaq.com/
                > >> (Reverse address to reply.)
                > >>
                > >>
                > >>
                > >>
                > >> "Rajani" <Rajani@discuss ions.microsoft. com> wrote in message
                > >> news:B17791C2-D4FA-45BC-B3CA-CFF9CFA44AF5@mi crosoft.com...
                > >> > Hello,
                > >> >
                > >> > dim receiptto
                > >> > receiptto="a2z@ yahoo.com"
                > >> > set cdoconfig=Creat eObject("CDO.co nfiguration")
                > >> > set cdomsg=CreateOb ject("CDO.Messa ge")
                > >> >
                > >> > with cdoconfig.Field s
                > >> >
                > >> ..Item("http://schemas.microso ft.com/cdo/configuration/sendusing")=2
                > >> >
                > >> >
                > >> ..Item("http://schemas.microso ft.com/cdo/configuration/smtpserver")="m ail8.we
                > >> bmail.com"
                > >> >
                > >> > 'this is the SMTP server setting in my outlook.
                > >> >
                > >> > .Update
                > >> > end with
                > >> > with cdomsg
                > >> > set .Configuration= cdoconfig
                > >> >
                > >> > .Fields("urn:sc hemas:mailheade r:disposition-notification-to")=receiptt o
                > >> > .Fields("urn:sc hemas:mailheade r:return-receipt-to") =receiptto
                > >> > .From="a2zwd@ya hoo.com"
                > >> > .To="mymail@yah oo.com"
                > >> > .Subject="Sampl e mail"
                > >> > .HTMLBody="<b>< font color=#ff0000 size=3
                > >> > face='arial'>He llo</font></b>"
                > >> > .DSNOptions=4
                > >> > .Fields.update
                > >> > .Send
                > >> > end with
                > >> > set cdoconfig=nothi ng
                > >> > set cdomsg=nothing
                > >> >
                > >> >
                > >> > Response.Write "Mail sent"
                > >> >
                > >> >
                > >> > I am getting the error ar .Send (Internal Server error 500
                > >> > If i didnt use configuration, sending mail correctly. (Simple from, to,
                > >> > subject, htmlbody, send).
                > >> >
                > >> >
                > >> > Thanx in advance
                > >>
                > >>
                > >>[/color][/color]
                >
                >[/color]

                Comment

                Working...