1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Sendmail code in ASP

Discussion in 'C#' started by kutekutta, May 4, 2009.

  1. #1
    Hi friends.

    I need a ASP code for contact form filler for my website. please help me out this problem.

    thanks in advance
     
    kutekutta, May 4, 2009 IP
  2. initiotech

    initiotech Well-Known Member

    Messages:
    187
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #2
    i Hope It helps
     
    initiotech, May 4, 2009 IP
  3. kutekutta

    kutekutta Peon

    Messages:
    807
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Please anybody can give me a clear explanation and code.
     
    kutekutta, May 25, 2009 IP
  4. wacamoi

    wacamoi Peon

    Messages:
    810
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #4
    there are some simple code here
    http://3w.ezer.com/asp/email/cdo.message.asp

    ----sending TEXT : objMessage.TextBody----
    Step by step.
    First you can use the most basic code to try.
    Due to many servers have different setting.
    So you have to list your error message so members can help you more.
    <%
    Dim objMessage
    Set objMessage = CreateObject("CDO.Message")
    objMessage.To = "to@---.com" 'where you want to send
    objMessage.From = "from@---.com" 'your email
    objMessage.Subject = "Subject" 'subject in quotes
    objMessage.TextBody = "sending text only" 'body in quotes
    objMessage.send
    'free up the the computer memory
    Set objMessage = Nothing
    %>
     
    wacamoi, May 25, 2009 IP
  5. rnvr

    rnvr Well-Known Member

    Messages:
    121
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #5
    first PUT the SMTP OUTGOING relay setting for the mail in web.config file....

    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <system.net>
    <mailSettings>
    <smtp from="xxx@domain.com">
    <network host="mail server name" userName="xxx@domain.com" password="xxxxxxxxx" />
    </smtp>
    </mailSettings>
    </system.net>
    ......

    then put the above given post code by fellow friend in the aspx.vb page

    if still not clear mail me at , $50 for contact list (Yahoo and gmail) download form.....or can bargain
     
    rnvr, May 26, 2009 IP
  6. zain654321

    zain654321 Peon

    Messages:
    202
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    This code is 100% tested.....
    <%
    Dim objMessage
    Set objMessage = CreateObject("CDO.Message")
    objMessage.To = "to@abc.com" 'where you want to send the mail'
    objMessage.From = "from@mu.com" 'your email
    objMessage.Subject = "Hello" 'subject in quotes
    objMessage.TextBody = "sending text only" 'body in quotes
    objMessage.send
    %>
     
    zain654321, Jul 8, 2009 IP
  7. JJnacy

    JJnacy Peon

    Messages:
    448
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #7
    if you have error message like this

    IIS, mail CDO ( CDO.Message.1 error '80040220' The "SendUsing" configuration value is invalid. )

    Find the solution here.
    http://help.securepaynet.net/topic/623?prog_id=ezer

    IIS Articles

    Can I connect to the IIS manager under IIS 7?
    For security reasons, we do not allow access to IIS manager under IIS 7. You can,...

    Upgrading Your Windows Shared Hosting Account to IIS 7
    You can upgrade to IIS 7 through the IIS Settings page in the Content section of...

    Is IIS 7 available for my Windows hosting account?
    Yes, IIS 7 is supported on new Windows shared hosting accounts. Once your account...

    Can I use Internationalized Domain Names (IDNs) with my IIS 7 Windows shared hosting account?
    Yes, our Windows shared hosting accounts running IIS 7 support the use of...

    What is an Internationalized Domain Name (IDN)?
    An Internationalized Domain Name (IDN) is a domain name that may contain characters...

    Changing Pipeline Mode on Your Windows IIS 7 Hosting Account
    Windows hosting accounts running IIS 7 offer two pipeline modes: classic and...

    Do you support PHP 5 for Windows shared hosting accounts?
    Yes, PHP 5 is fully supported on Windows shared hosting accounts running IIS 7....

    Are there any IIS 7 features not supported on your Windows shared hosting accounts?
    While the vast majority of IIS 7 functionality is supported by our Windows hosting...

    Which version of IIS should I choose?
    Unless you have specific reasons to use IIS 6, such as a need for ColdFusion or...

    What are the benefits of IIS 7?
    IIS 7 is Microsoft's latest version of its Internet Information Services Web server....

    How should I send email from my IIS 7 Windows shared hosting Web site?
    Windows shared hosting accounts running IIS 7 can use Collaboration Data Objects...

    Using CDO to Send Email from Your Windows Shared Hosting Web Site
    Collaboration Data Objects (CDO) can be used to send email from Windows shared...

    What is pipeline mode?
    Pipeline mode refers to how a Web server processes client requests. IIS 7 offers...

    Migration Issues with IIS 7's Integrated Pipeline Mode
    IIS 7 offers two pipeline modes. Due to the integration between the ASP .NET...
     
    JJnacy, Jul 10, 2009 IP
  8. ziv

    ziv Peon

    Messages:
    18
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
        public static void SendEmail(string To, string FromAddress, string FromName , string Subject, string Body, string SmtpServer)
        {
            MailMessage oMail = new MailMessage();
            oMail.From = new MailAddress(FromAddress, FromName);
            oMail.To.Add(To);
            oMail.Subject = Subject;
            oMail.IsBodyHtml = true;
            oMail.Body = Body;
            SmtpClient Smtp = new SmtpClient(SmtpServer);
            Smtp.Send(oMail);
        }
    
    Code (markup):
     
    ziv, Jul 23, 2009 IP