close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

UE Not Sending Emails

Thread began 5/29/2009 11:44 pm by karen.marley367377 | Last modified 6/01/2009 7:11 am by Ray Borduin | 1820 views | 1 replies |

karen.marley367377

UE Not Sending Emails

Hi I am having trouble sending emails from the Members_EmailPW.asp
Am using ASP Javascript and the error message after submitting the page is as follows:

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/WA_Universal_Email/Mail_JS.asp, line 33

800401f3
The code from this file is as follows:
<%
var gBodyFormat = "";
var gOneToAddress = false;

function WAUE_AddAttachment(mailObj,attPath) {
if (WAUE_isAttachment(attPath)) {
mailObj.AddAttachment(attPath);
}
return mailObj;
}

function WAUE_SetCharset(mailObj,charSet) {
if (charSet=="us ascii" || charSet=="ISO-8859-1") {
if (charSet=="us ascii") {
mailObj.CharSet = 1;
}
else {
mailObj.CharSet = 2;
}
}
else {
mailObj.CustomCharSet = charSet;
}
return mailObj;
}

function WAUE_AddBCC(mailObj,bccEmail) {
if (bccEmail != "") {
var bccArray = WA_getEmailArray(bccEmail);
for (var bcc=0; bcc < bccArray.length; bcc++) {
if (String(bccArray[bcc][0]).indexOf("@")>=0) {
if (WAUE_isEmailAddress(bccArray[bcc][0])) {
mailObj.AddBCC(bccArray[bcc][1], bccArray[bcc][0]);
}
}
else {
if (WAUE_isEmailAddress(bccArray[bcc][1])) {
mailObj.AddBCC(bccArray[bcc][0], bccArray[bcc][1]);
}
}
}
}
return mailObj;
}

function WAUE_AddCC(mailObj,ccEmail) {
if (ccEmail != "") {
var ccArray = WA_getEmailArray(ccEmail);
for (var cc=0; cc < ccArray.length; cc++) {
if (String(ccArray[cc][0]).indexOf("@")>=0) {
if (WAUE_isEmailAddress(ccArray[cc][0])) {
mailObj.AddCC(ccArray[cc][1], ccArray[cc][0]);
}
}
else {
if (WAUE_isEmailAddress(ccArray[cc][1])) {
mailObj.AddCC(ccArray[cc][0], ccArray[cc][1]);
}
}
}
}
return mailObj;
}

function WAUE_AddRecipient(mailObj,recEmail) {
if (recEmail != "") {
var recArray = WA_getEmailArray(recEmail);
for (var rec=0; rec < recArray.length; rec++) {
if (String(recArray[rec][0]).indexOf("@")>=0) {
if (WAUE_isEmailAddress(recArray[rec][0])) {
mailObj.AddRecipient(recArray[rec][1], recArray[rec][0]);
gOneToAddress = true;
}
}
}
}
return mailObj;
}

function WAUE_BodyFormat(mailObj,bodyFormat) {
if (bodyFormat == 0) {
mailObj.ContentType = "text/html";
}
else {
mailObj.ContentType = "text/plain";
}
gBodyFormat = bodyFormat;
return mailObj;
}

function WAUE_Definition(remHost) {
var retVal = Server.CreateObject("SMTPsvg.Mailer");
if (remHost != "") {
retVal.RemoteHost = remHost;
}
gOneToAddress = false;
return retVal;
}

function WAUE_SendMail(mailObj,mailAttachments,mailBCC,mailCC,mailTo,mailImportance,mailFrom,mailSubject,mailBody) {
if (gOneToAddress) {
var fromArray = WA_getEmailArray(mailFrom);
mailObj.FromAddress = fromArray[0][1];
if (fromArray[0][0] && fromArray[0][0] != "") {
mailObj.FromName = fromArray[0][0];
}
if (gBodyFormat == 2) {
var WA_Boundry = "----xxxxxx";
var WA_TextHeader = "--" + WA_Boundry + "\r\n" + "Content-Type: text/plain;" + "\r\n" + "Content-Transfer-Encoding: 7bit" + "\r\n" + "\r\n";
var WA_HTMLHeader = "--" + WA_Boundry + "\r\n" + "Content-Type: text/html;" + "\r\n" + "Content-Transfer-Encoding: 7bit" + "\r\n" + "\r\n";
var WA_Footer = "--" + WA_Boundry + "--" + "\r\n";

mailBodyArray = mailBody.split("<multipartbreak>")
mailBody = WA_TextHeader + mailBodyArray[0] + "\r\n" + WA_HTMLHeader + mailBodyArray[1] + "\r\n" + WA_Footer
mailObj.ContentType = "multipart/alternative; boundary=\"" + WA_Boundry + "\""
}
mailObj.Subject = mailSubject;
mailObj.BodyText = mailBody;
if (!mailObj.SendMail()) {
Response.Write(mailObj.Response);
Response.End
}
}
return mailObj;
}

function WAUE_SetImportance(mailObj,Importance) {
var newImportance = parseInt(Importance);
var newPriority = 3;
if (isNaN(newImportance)) {
if (Importance.toUpperCase() == "HIGH") {
newPriority = 1;
}
if (Importance.toUpperCase() == "LOW") {
newPriority = 5;
}
}
else {
newPriority = newImportance;
}
mailObj.Priority = newPriority;
return mailObj;
}
%>

With the line that generates the error as follows:

var retVal = Server.CreateObject("SMTPsvg.Mailer");

Please Help! X

Sign in to reply to this post

Ray BorduinWebAssist

This means that the email COM object you have selected to use for the email is not installed on the server you are running the .asp page from.

Sign in to reply to this post
Did this help? Tips are appreciated...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...