Results 1 to 8 of 8

Thread: smtp sendmail

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    smtp sendmail

    hi there

    using ASP.NET/vb.net


    i am trying to send mail. I am running Windows Server 2003, with IIS6 and has the smtp mail service installed, and configured

    however, i get an error when pressing the submit button to send mail

    "Could not access 'CDO.Message' object"


    ???

    what does this mean? I have given the message object the name of the server....but this is what the error is

    any ideas?

  2. #2
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Re: smtp sendmail

    System.Web.Mail...?

    Code:
    
    publicstaticvoid Send(System.Web.Mail.MailMessage msg, string server)
     
    {
     
    if(msg.Subject == null || msg.Subject == ""){msg.Subject = "News From PK Promotions";}
     
    if(msg.From == null|| msg.From == ""){msg.From = "\"PK Promo\" <[email protected]>";}
     
    if(msg.From == "[email protected]"){msg.From= "\"PK Promo\" <[email protected]>";}
     
    System.Web.Mail.SmtpMail.SmtpServer = server;
     
    System.Web.Mail.SmtpMail.Send(msg);
     
    }
     
    
    C# sorry but you should get the idea. I just pass a msg and server. I actually have this wrapped with the server set.....

    System.Environment.MachineName

    Last edited by Magiaus; Jan 11th, 2005 at 10:41 AM.
    Magiaus

    If I helped give me some points.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: smtp sendmail

    that is what i really have.... but dont work

  4. #4
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Re: smtp sendmail

    Who host your site? If the server isn't configured to relay properly it will fail. But, it not finding the object is strange. I thought it came installed on 2003.
    Magiaus

    If I helped give me some points.

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: smtp sendmail

    i am configuring the server. on my own local box

    this is the error i get in the innerexception:

    Message "The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for [email protected]


    i did a google, and it came up with a fix from MS website, i applied the fix but didnt fix it - or something wrong somewhere in the code.


    I have 2 boxes, one is my dev box, the other is the smtp and SQL server. I installed IIS6 with SMTP and configured it... i made sure that the smarthost is the name of the local box - still no luck

    what can be done?

  6. #6

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: smtp sendmail

    ok i think i fixed it, had to configure the server to allow relay from all servers apart from a selected range

    however, it does not seem to send an email - it succeds in sending the email (apperently) from vb.net but i get no email!

    this is using SMTP server in IIS6 Windows Server 2003

  7. #7
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Re: smtp sendmail

    had this problem and I had to just play with the setting on the smtp to get it working. Then I had problems with the mail I sent getting marked as junk by msn, yahoo,.....

    Oh. Be sure to use the Allow in this list. I tried the other way and bots on the outside found my server and used it to relay porn to mask where it was coming from. I was sending 1000 of porn a sec. I only knew because of my virus scanner;it got locked up.

    I have the doman I am using in the from field in my allow list.
    Magiaus

    If I helped give me some points.

  8. #8
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690

    Re: smtp sendmail

    I just ran into a similar problem yesterday. My app seemed to send email to the smtp server just fine, but the emails never arrived. Took a look and in ...\Inetpub\mailroot\Queue on the mail server were all my emails. Talked to the network guys, and apologies I don't know exactly what they did, but it had something to do with the smtp server not being able to send out the emails. Port wasn't open or something.

    Look to see if you've got messages waiting to be sent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width