# Sending mail through asp

**URL:** <https://forum.kirupa.com/t/sending-mail-through-asp/232878>\
**Category:** Uncategorized\
**Created:** [July 18, 2007, 1:28pm UTC](https://forum.kirupa.com/t/sending-mail-through-asp/232878 "2007-07-18T13:28:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sachinflash](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@sachinflash](https://forum.kirupa.com/u/sachinflash)\
**Post date:** [July 18, 2007, 1:28pm UTC](https://forum.kirupa.com/t/sending-mail-through-asp/232878/1 "2007-07-18T13:28:25Z")

</div>

Hi friends,  
i’ve made a form in flash & want to send information with the help of asp ,but when i test it on server it not give me any reply.  
is there any suggestion…?  
the asp code is given below

\<%  
’ Put your SMTP Mail server here. If you do not know, ask your network administrator  
smtpServer = ftp.whatever.com  
smtpPort = 25  
’ —  
dim smtpServer, smtpPort

Set message = CreateObject (“JMail.Message”)  
'message.ServerAddress = smtpServer & “:” & smtpPort  
message.From = Request.Form(“fromEmail”)  
message.FromName = Request.Form(“fromName”)  
message.Subject = “Flash Movie Feedback”  
message.AddRecipient “me[@whatever.com](mailto:me@whatever.com)”, “whatever”  
message.ContentType = “text/html” ’ or you can put ‘text/plain’ for plain text emessage  
message.ISOEncodeHeaders = false  
message.ContentTransferEncoding = “8bit”  
message.Body = Request.Form(“body”)  
’ 1 - highest priority (Urgent) ’ 3 - normal ’ 5 - lowest  
message.Priority = 3

’ Add sender’s IP address (not required, but useful for web-based emessage)  
'message.AddHeader “Originating-IP”, Request.ServerVariables (“REMOTE\_ADDR”)  
'Send the e-mail  
message.Send(smtpServer & “:” & smtpPort)  
Response.write “success=1&timeDate=” & Server.URLEncode(message.Date) & “&end=1”  
set message = nothing  
%\>  
…  
the flash action script is given below, i’ve put it on 1st frame of main timeline.

function sendComments() {  
var sender:LoadVars = new LoadVars();  
var responder:LoadVars = new LoadVars();  
var scriptURL = “ftp://ftp.whatever.com/sendmail.asp”;  
responder.onLoad = function(success){  
if (success) {  
\_global.serverTime = this.timeDate;  
\_root.gotoAndStop(“output”);  
} else {  
\_root.gotoAndStop(“error”);  
}  
};  
sender.fromEmail = fromEmail\_txt.text;  
sender.fromName = fromName\_txt.text;  
sender.body = comments\_txt.text;  
sender.sendAndLoad(scriptURL, responder, “POST”);  
\_root.gotoAndStop(“wait”);  
}  
this.\_lockroot = true;
