The "SendUsing" configuration value is invalid.

Author Message
moiseszaragoza

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 9/15/2010
  • Status: offline
The "SendUsing" configuration value is invalid. Wednesday, September 15, 2010 5:05 AM (permalink)
0

I am trying to send mail but i am haviing a err thar reads 

The "SendUsing" configuration value is invalid.

My code 
[CODE]
function SendEmail(to, subject, body) {
var recusr = Server.CreateObject("ADODB.Recordset");
var mail = Server.CreateObject("CDO.Message");

var objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mailout.circletechfl.com" 
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")  = 25 
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1 //'cdoSendUsingPickup
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 
//objCDOSYSCon.Fields.Update 
mail.Configuration = objCDOSYSCon


var arrEmTo = new Array();
var sql, page, str;
var cc = bcc = from = "";

// determine where the email goes
switch(to) {
case "administrators":
to = "lfoote@circletechfl.com, katief@circletechfl.com, stacyk@circletechfl.com";
cc = "support@circletechfl.com";

break;
case "managers":
sql = "SELECT email FROM vwUsers WHERE role IN(4)";
recusr = OpenRec(sql, page);
while(!recusr.EOF) {
arrEmTo[arrEmTo.length] = String(recusr("email"));
recusr.MoveNext();
}
recusr.Close();

to = arrEmTo;
cc = "support@circletechfl.com";
break;
case "testemail":
to = "support@circletechfl.com";
break;
case "support":
to = "support@circletechfl.com";
break;
default:
sql = "SELECT * FROM users WHERE userid='"+to+"'";
recusr = OpenRec(sql, page);
to = !recusr.EOF?String(recusr("email")):"";
recusr.Close();
//to = to;
}

// format data
str = "ONE [auto]: "+subject;
subject = InetFolder=="webapp-beta"?"TEST EMAIL: "+subject:str;
from = uEmail==""?"support@circletechfl.com":uEmail;

body = "<p><em>This email has been automated by the system.</em></p><p>"+body+"</p>";

// append to body
switch(to) {
case "support":
body += "";
break;
}

// send email
//mail.BodyFormat = 0; // 0 = HTML, 1 = Plain Text
//mail.MailFormat = 0; // 0 = MIME, 1 = Plain Text
//mail.Importance = 1; // 0 = Low, 1 = Normal, 2 = High
mail.To = to;
mail.Cc = "mZaragoza@circletechfl.com";
mail.Bcc = "mZaragoza@circletechfl.com";
mail.From = from; // session object (user email)
mail.Subject = subject;
mail.HTMLBody = body+" "+emFooter;


if(gblExecuteSql && gblEnableEmail && !blnDebugPage) {
try {
mail.Send();
Response.Write("<br> PASS <br>");
} catch(e) {
//SendEmail("support","Email Error ("+uid+")",e.message+"<p>To: "+to+"| Subject: "+subject+"<br>Body: "+body);
//Response.Redirect(page+"&emsg="+e.message);
Response.Write("<br> FAIL <br><strong>" + e.message + "</strong><br><br><br><hr>" );
}
} else {
//Response.Write("<p><strong>Email From:</strong> "+from+" | <strong>Email To:</strong> "+to+" | <strong>Email Cc:</strong> "+cc+" | <strong>Email Bcc:</strong> "+bcc+" <br><strong>Email Subject:</strong> "+subject+" <br><strong>Email Body:</strong> "+body+"</p>");
}


Response.Write(mail.To + " -- mail.To<br>");
Response.Write(mail.Cc + " -- mail.Cc<br>");
Response.Write(mail.Bcc + " -- mail.Bcc<br>");
Response.Write(mail.From + " -- mail.From<br>");
Response.Write(mail.Subject + " -- mail.Subject<br>");
Response.Write(mail.HTMLBody + " -- mail.HTMLBody<br>");

}
SendEmail("moisesz", "EMail Test Mail", "TEST MESSAGE Mail")
[/CODE]
<message edited by moiseszaragoza on Wednesday, September 15, 2010 5:07 AM>
 
#1
    rainsworth

    • Total Posts : 8
    • Scores: 0
    • Reward points : 0
    • Joined: 6/15/2008
    • Status: offline
    Re:The "SendUsing" configuration value is invalid. Sunday, September 19, 2010 12:51 PM (permalink)
    0
    Make sure the SMTP service is installed on the pc your trying to run this script from
     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9