thaiall logomy background
coding : emailconfirm. sendmail.asp.
my town
Source : Perl | PHP | ASP | JSP | HTML | HTML5 | JavaScript | Java | COBOL | C++ | MS Access | VBNet | VB | Python | โค้ดดี
File : sendmail.asp. ID : 2703
Skin : Default | Sons-of-obsidian | Sunburst | Highlighter | Full
<! refer from http://www1.domaindlx.com/aspemailsample.html>
<body><b>Sendmail.asp</b> version 1.0<br>
<form action=sendmail.asp method=post>
SMTP Host<select name=gethost>
<option value=mail.loxinfo.co.th selected>mail.loxinfo.co.th
<option value=mail.a-net.net.th>mail.a-net.net.th
<option value=bkk1.asiaaccess.net.th>bkk1.asiaaccess.net.th
<option value=classic.asianet.co.th>classic.asianet.co.th
<option value=mail.cscoms.com>mail.cscoms.com
<option value=mail.linethai.co.th>mail.linethai.co.th
<option value=mail.fareast.net.th>mail.fareast.net.th
<option value=mail.idn.co.th>mail.idn.co.th
<option value=smtp.infonews.co.th>smtp.infonews.co.th
<option value=mozart.inet.co.th>mozart.inet.co.th
<option value=smtp.samart.co.th>smtp.samart.co.th
<option value=mail.wnet.net.th>mail.wnet.net.th
<option value=smtp.softhome.net>smtp.softhome.net
</select><br>
From E-mail:<input type=text name=femail>
From Name:<input type=text name=fname>
Reply to E-mail:<input type=text name=remail><br>
To E-mail:<input type=text name=temail>
To Name:<input type=text name=tname><br>
CC E-mail:<input type=text name=ccemail>
BCC E-mail:<input type=text name=bccemail><br>
Subj:<input type=text name=subj size=50><br>
<textarea name=msg rows=10 cols=80>
</textarea><br>
<br><input type=submit value=Send>
</form>
<%
gethost = request.form("gethost")
femail = request.form("femail")
fname = request.form("fname")
remail = request.form("remail")
temail = request.form("temail")
tname = request.form("tname")
ccemail = request.form("ccemail")
bccemail = request.form("bccemail")
subj = request.form("subj")
msg = request.form("msg")
if (len(temail)<2)or(len(femail)<2) _
  or(len(subj)<2) then
  response.write("Please enter your name and/or e-mail address")
else
  Set Mail = Server.CreateObject("Persits.MailSender") 
  Mail.Host = gethost 
  Mail.From = femail 
  Mail.FromName = fname
  Mail.AddAddress temail ,tname  
  if len(remail) > 2 then Mail.AddReplyTo remail end if
  if len(ccemail) > 2 then Mail.AddCC ccemail end if  
  if len(bccemail) > 2 then Mail.AddBCC bccemail end if  
  Mail.Subject = subj
  Mail.Body = msg
  On Error Resume Next 
  Mail.Send 
  if Err <> 0 then 
    ErrMsg = "เกิดข้อผิดพลาด : " & Err.Description 
  else
    ErrMsg = "ส่ง mail เรียบร้อย<br>"
    ErrMsg = ErrMsg + "ถ้ามีโอกาส กลับมาใช้บริการใหม่นะครับ"
  end If
  set mail = nothing
  response.write(ErrMsg)
end if
%>
</body> 
จำนวน : 68 บรรทัด
าษาเฮชทีเอ็มแอล (HTML = HyperText Markup Language) คือ ภาษาคอมพิวเตอร์ที่ออกแบบมาเพื่อใช้ในการสร้างเว็บเพจที่เรียกดูผ่านทางเว็บเบราว์เซอร์ (Web Browser) เริ่มพัฒนาโดย ทิม เบอร์เนอรส์ ลี (Tim Berners Lee) ในปัจจุบัน HTML ล่าสุดคือ รุ่น 5 เป็นมาตรฐานหนึ่งของ ISO ซึ่งจัดการโดย World Wide Web Consortium (W3C) ในปัจจุบัน ทาง W3C ผลักดัน รูปแบบของ HTML แบบใหม่ ที่เรียกว่า XHTML รุ่นแรกคือ 1.0 (ม.ค.2543) ซึ่งมีโครงสร้างเป็นแบบ XML (eXtensible Markup Language)
าษาพีเอชพี (PHP Language) คือ ภาษาคอมพิวเตอร์ประเภทโอเพนท์ซอร์ท (Open Source Computer Language) สำหรับพัฒนาเว็บเพจแบบไดนามิก เมื่อเครื่องบริการได้รับคำร้องจากผู้ใช้ก็จะส่งให้กับ ตัวแปลภาษา ทำหน้าที่ประมวลผลและส่งข้อมูลกลับไปยังเครื่องของผู้ใช้ที่ร้องขอ ในรูปเอชทีเอ็มแอล ภาพ หรือแฟ้มดิจิทอลอื่นใด ลักษณะของภาษามีรากฐานคำสั่งมาจากภาษาซี เป็นภาษาที่สามารถพัฒนาให้ใช้งานแบบโต้ตอบกับผู้ใช้ได้
าษาไพทอน (Python Language) คือ ภาษาคอมพิวเตอร์ประเภทโอเพนท์ซอร์ท (Open Source Computer Language) สำหรับพัฒนาแอพพลิเคชั่นโดยไม่ยึดติดกับแพลตฟอร์ม (Platform) และใช้ในงานได้หลายประเภท ทั้งใช้ในการประมวลผลผ่านคอมมานด์ไลน์ หรือเป็นเว็บเพจแบบไดนามิก เมื่อเครื่องบริการได้รับคำร้องจากผู้ใช้ก็จะส่งให้โค้ดให้กับตัวแปลภาษา เพื่อทำหน้าที่ประมวลผลและส่งข้อมูลกลับไปยังเครื่องของผู้ใช้ที่ร้องขอ ในรูปข้อความ เอชทีเอ็มแอล ภาพ หรือแฟ้มดิจิทอลอื่นใด ลักษณะของภาษามีรากฐานคำสั่งมาจากภาษาซี เป็นภาษาที่สามารถพัฒนาให้ใช้งานแบบโต้ตอบกับผู้ใช้ได้ จุดที่แตกต่างกับภาษาอื่น คือ การรวบรวมจุดเด่นของแต่ละภาษามารวมเข้าด้วยกัน
ตัวอย่าง Hello World
ปรับปรุงโปรแกรม source.pl : 2565-07-24
rspsocial
Thaiall.com