![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
ASP Script to Send Japanese Mail
IMPORTANT:
When working with utf-8 ASP and HTML files, make sure the file is saved
with a utf-8 preamble.
<%@ Language=VBScript %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=utf-8">
<title>Send Japanese Email</title>
</head>
<body bgcolor="#FFFFFF">
<form method="post" action="SendJapanese.asp">
<p>From
<input type="text" name="From" value="Chilkat Support <support@chilkatsoft.com>" size="80">
</p>
<p>To
<input type="text" name="Recipient" size="80" value="以上」とする <matt@chilkatsoft.com>">
</p>
<p>Subject
<input type="text" name="Subject" size="80" value="パートタイマーの厚生年金加入拡大へ">
</p>
<p>Body
<textarea name="HtmlBody" cols="80" rows="12">
<html>
<head>
<title>Sample Japanese HTML</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF">
<h2>パートタイマーの厚生年金加入拡大へ </h2>
<p><font color="#6600CC" size="+1">パートタイマーの厚生年金加入拡大へ</font> </p>
</body>
</html>
</textarea>
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
</body>
</html>
ASP to Send Japanese Mail
<%@ LANGUAGE="VBSCRIPT" %>
<HTML>
<HEAD>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=utf-8">
<TITLE>Send Japanese HTML Mail from ASP</TITLE>
</HEAD>
<BODY>
<%
' Create a mailman
set mailman = Server.CreateObject("Chilkat.MailMan")
' Any unlock code begins the 30-day trial
mailman.UnlockComponent "anything"
' Tell the mailman where the SMTP server is located
mailman.SmtpHost = "mail.earthlink.net"
' Create an Email message
set email = Server.CreateObject("Chilkat.Email")
' Enter the recipient's information
email.AddMultipleTo Request.Form("Recipient")
' Enter the sender's information
email.From = Request.Form("From")
' Enter the email subject
email.Subject = Request.Form("Subject")
' Enter the email text
email.SetHtmlBody Request.Form("HtmlBody")
' Convert the email to Shift_JIS
email.Charset = "Shift_JIS"
' Sends the email with the patterns replaced.
success = mailman.SendEmail(email)
if (success = 1) then
Response.write "Message sent successfully!<br><br>"
Response.write "MESSAGE SOURCE:<br>"
Response.write "<pre>"+email.GetMime()+"</pre>"
else
Response.write "FAILED!<br>"
Response.write mailman.LastErrorHtml
end if
Set email = Nothing
Set mailman = Nothing
%>
</BODY>
</HTML>
|
|||||
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.