สยามอีโคโฮสต์ดอทคอม

เว็บไซต์นี้ได้รับประกาศนียบัตร ผ่านเกณฑ์การประกวดเว็บไซต์พาณิชย์อิเล็กทรอนิกส์ดีเด่น Best e-Commerce Website Award 2016 จากกรมพัฒนาธุรกิจการค้า
Bangkok booked.net
+28°C
Follower Us
Share This Page
Page Views
  • Visitor Online
     
  •  14 
    เปิดทำการ จันทร์ - เสาร์ เวลา 09:00 - 20:00 น. ขณะนี้เป็นเวลา: เปิดทำการ
    นอกเวลาทำการหรือวันหยุด กรุณาติดต่อผ่านช่องทาง Robot Support หรือ Email: support@siamecohost.com
  • การส่งอีเมล์ด้วย CDONTS component (ASP)

    การส่งอีเมล์ด้วย CDONTS component (ASP)

    ปรับปรุงล่าสุด 10/09/2558 - กรุณาดูหมายเหตุ ด้านล่างด้วยครับ

    1.) สร้างแบบฟอร์ม สำหรับกรอกข้อมูล เพื่อส่งอีเมล์ผ่านหน้าเว็บ ตั้งชื่อไฟล์เป็น formmail.html
    
    	
    <html>
    <head>
    <title>Your Title Here</title>
    </head>
    <body bgcolor="#FFFFFF">
    <form method="post" action="sendmailresult.asp">
    <table width="60%" border="1" cellspacing="0" cellpadding="3" align="center" bordercolor="#CCCCCC">
    <tr bgcolor="#CCFF00">
    <td colspan="2"><b>Send Mail with CDONTS component</b></td>
    </tr>
    <tr>
    <td width="27%">From</td>
    <td width="73%"><input type="text" name="From"></td>
    </tr>
    <tr>
    <td width="27%">To</td>
    <td width="73%">
    <input type="text" name="To">
    </td>
    </tr>
    <tr>
    <td width="27%">CC</td><td width="73%">
    <input type="text" name="CC">
    </td>
    </tr>
    <tr>
    <td width="27%">Subject</td><td width="73%">
    <input type="text" name="Subject">
    </td>
    </tr>
    <tr>
    <td width="27%">Body</td>
    <td width="73%">
    <textarea name="Body" cols="50" rows="5" style="font-size: 14pt"></textarea>
    </td>
    </tr>
    <tr align="center">
    <td colspan="2">
    <input type="submit" value="Submit">
    </td>
    </tr>
    </table>
    </form>
    </body>
    </html>

    ตัวอย่างการแสดงผลหน้า form2mail.html



    2.) สร้าง script ASP เพื่อรับค่า input จาก formmail.html แล้วส่งข้อมูลไปให้ผู้รับตามที่กำหนด โดยตั้งชื่อไฟล์เป็น sendmailresult.asp
    
    
    <%@ LANGUAGE="VBSCRIPT" %>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type"
    content="text/html;charset=tis-620">
    <title>Your Title Here</title>
    <%
    Sub Write(strWriteThis)
    'This subroutine just writes out whatever is
    'passed to it.
    response.write(strWriteThis & "<br>")
    end sub
    %>
    </HEAD>
    <BODY>
    <%
    Dim myCDONTSMail
    Dim strFrom
    Dim strTo
    Dim strSubject
    Dim strMessage
    Dim lngImportance
    'The following variable assignments are not required
    'they are just here to make interpretation of the
    'myCDONTSMail.Send line easier. You could put the
    'Request.Form statements in the .Send line to cut down
    'on the amount of code in the file.
    strFrom=request.form("txtFrom")
    strTo=request.form("txtTo")
    strSubject = request.form("txtSubject")
    strBody=request.form("txtMessage")
    lngImportance = request.form("optImportance")
    'The following four lines of code are just here for test
    'purposes to see what variables have been pulled in from the
    'HTM form.
    'Write("strFrom = " & strFrom)
    'Write("strTo = " & strTo)
    'Write("strSubject = " & strSubject)
    'Write("strMessage = " & strBody)
    'Write("Importance = " & lngImportance)
    Set myCDONTSMail = CreateObject("CDONTS.NewMail")
    myCDONTSMail.Send strFrom,strTo,strSubject,strBody,lngImportance
    Set myCDONTSMail = Nothing
    Write "Mail has been sent."
    Write "อีเมล์ถูกส่งออกไปให้ ผู้รับ : " &strTo &" เรียบร้อยแล้วครับ<br>"
    Write "<a href='#' onclick='history.back()'>Back</a>"
    %>
    </BODY>
    </HTML>

    3.) สร้าง Function สำหรับส่งอีเมล์ไปให้ผู้รับตามที่กำหนด โดยตั้งชื่อไฟล์เป็น sendmail.asp
    
    	
    <%
    Sub SendMail(sFrom,sTo,sCC,sSubject,sBody)
    ' รับค่าที่ส่งจาก Form ได้แก่ From, To, CC, Subject, Body
    Dim sm
    Set sm = Server.CreateObject("CDONTS.Newmail")
    sm.SetLocaleIDs "874" ' กำหนด Code Page ให้แสดงผลภาษาไทย
    sm.MailFormat = 0 ' กำหนดให้ส่งอีเมล์ในรูปแบบ MIME
    sm.BodyFormat = 0 ' กำหนดให้ข้อความในอีเมล์เป็น HTML
    sm.From = sFrom
    sm.To = sTo
    sm.CC = sCC
    sm.Subject = sSubject
    sm.Body = sBody
    sm.Send
    '--------------------------------------------------------------------
    ' การส่งอีเมล์อีกวิธีหนึ่ง
    ' sm.Send(sFrom,sTo,sCC,sSubject,sBody)
    '--------------------------------------------------------------------
    Set sm = Nothing
    End Sub
    %>

    3) ท่านสามารถ Download ASP Script ทั้ง 3 ไฟล์นี้ได้ โดย คลิกตรงนี้
    หรือ Save เก็บไว้ใน Google Drive ของคุณ   


    4.) Upload ทั้ง 3 ไฟล์ ขึ้นไปไว้บน Server

    5.) ทดสอบการใช้งานโดยเปิดหน้า http://www.yourdomain.com/formmail.asp กรอกข้อมูลให้ครบทุกช่อง แล้วคลิกปุ่ม "Submit"

    6.) เข้าไปเช็ค inbox ของอีเมล์ผู้รับ ว่าได้รับอีเมล์หรือไม่ อย่าลืมตรวจสอบใน Junk box หรือ ถังขยะด้วย

    หมายเหตุ

    เนื่องจาก Mail Server มีระบบป้องการ SPAM ดังนั้นกรุณาตั้งค่าการ รับ-ส่ง อีเมล์ใน Script ของท่านดังต่อไปนี้
    1. การรับอีเมล์จากหน้าแบบฟอร์มในเว็บไซต์ (Form Mail) ตรงอีเมล์ผู้รับ (To:) ต้องเป็นอีเมล์ @yourdomain.com เท่านั้น
    2. การส่งอีเมล์ไปถึงผู้รับปลายทาง ตรงอีเมล์ของผู้ส่ง (From:) ต้องเป็นอีเมล์ @yourdomain.com เท่านั้น



    ไม่สงวนสิทธิ์ในการนำไปเผยแพร่แต่ต้องแสดงแหล่งที่มา



    Thai e-Commerce Association
    SME Registered
    TrustedSite
    Google Safe Browsing
    DMCA.com Protection Status DMCA compliant image






    Site Map
    Main Menu

    หน้าแรก
    เกี่ยวกับเรา
    คำนิยมจากลูกค้าที่ใช้บริการ
    ดูคำอธิบายบริการแต่ละประเภท
    สาธิตขั้นตอนสมัครใช้บริการ
    ตัวช่วยในการเลือกสินค้า/บริการ
    ขอใบเสนอราคา

    วิธีชำระค่าบริการ
    แจ้งยืนยันการโอนเงิน
    ดาวน์โหลดใบเสร็จรับเงิน
    ประวัติสั่งซื้อ/วันครบกำหนดชำระ

    ข้อตกลงการใช้บริการ
    นโยบายความเป็นส่วนตัว
    การรับประกันความพึงพอใจ
    หลักฐานการจดทะเบียนพาณิชย์
    FAQ รวมคำถามที่พบบ่อย
     ติดต่อสอบถาม

    Siamecohost's Blog
    Product & Service

    Windows Hosting Starter
    Windows Hosting MaxValue Basic
    Windows Hosting MaxValue Plus
    Windows Cloud Hosting (Malaysia)

    Linux Hosting Starter
    Linux Hosting Max Value
    WordPress Cloud Hosting (SG)
    Linux Cloud Hosting (Malaysia)

    Business Email Economy
    Business Email Standard
    Private Email Hosting
    Business Email Premium
    Cloud Email Standard (US)
    Cloud Email Enterprise (US)
    SpamExperts Spam Filtering

    VPS Windows SSD (Malaysia)
    VPS Linux SSD (Malaysia)
    Cloud Server Windows (Thailand) Cloud Server Linux (Thailand)

    Dedicated Server (Thailand)
    Dedicated Server (Malaysia)

    Co-Location (Thailand)
    Domain Name Service

    รายละเอียด/ราคา/จด/ต่ออายุ/โอนย้าย
    เช็คชื่อโดเมน ภาษาอังกฤษ
    เช็คชื่อโดเมน ภาษาไทย
    เช็คชื่อโดเมนทีละหลายชื่อ
    ดูวันที่โดเมนเนมหมดอายุ
    ตรวจสอบชื่อผู้ให้บริการโดเมนเนม
    ตรวจสอบอายุโดเมนเนม
    ดูข้อมูลโดเมน Whois
    คำอธิบายสถานะโดเมน
    วงจรชีวิตโดเมนเนม
    ขั้นตอนการโอนย้ายโดเมน
    ขั้นตอนการโอนย้ายเว็บไซต์
    วิธีแก้ไขข้อมูลโดเมนเนม
    การยืนยันความเป็นเจ้าของโดเมน
    แก้ปัญหาโดเมนถูกระงับการใช้งาน

    Misc. Service

    SSL Certificate
    Email Certificate (S/MIME)
    Document Signing Certificate
    TrustedSite Certifications
    cWatch Website Security
    Sitelock Website Security
    CodeGuard Cloud Backup
    SMEShop Package (e-Commerce)
    Support Center

    ศูนย์ช่วยเหลือและบริการ
    คู่มือการใช้งาน Email เบื้องต้น
    คู่มือการใช้งาน Windows+Plesk
    คู่มือการใช้งาน Linux+DirectAdmin
    คู่มือการใช้งาน Private Cloud Hosting
     แจ้งปัญหาการใช้งาน

    Misc & Free Service

    แหล่งรวมความรู้เพื่อคนทำเว็บ
    ฟรี Widgets ตกแต่งหน้าเว็บ
    Free Counter สถิติผู้เข้าชมเว็บไซต์
    SSL Certificate Tools
    ตรวจสอบความเร็วอินเทอร์เน็ต
    Network Tools (เช็คระบบเน็ตเวิร์ค)
    Email Tools (ตรวจสอบปัญหาอีเมล์)
    ตรวจสอบสถานะของ Server
    ตาราง Backup ข้อมูลรายสัปดาห์
    ดาวน์โหลด ฟรี! SMEShop Script
    ฟรี บริการย่อลิงค์ให้สั้นลง
    ฟรี ระบบแบบฟอร์มออนไลน์
    ส่งไฟล์ขนาดใหญ่ผ่านอีเมล์
    Dropbox ฟรีพื้นที่เก็บไฟล์บนคลาวด์
    บันทึก นัดหมาย การประชุม
    บริการ Payment Gateway

  • Affiliates Partner Program

    Follow Us เว็บไซต์ของฉันอยู่ Server ไหน Free Auto Backlink For SEO

    This website made with Best view with modern web browser. Best View A design css menu by booNavigation jQuery plugin