"Murphy was an optimist!"
The ASP Butt Kicking Saga September 22, 2007 10:48 pm
Posted by Doug McCaughan in : ASP, Daily Life, Programming, TechnologyHurdle 2 is now complete! The host’s local SMTP server is not configured correctly. The website is hosting its pop/smtp email else where. Using Method 3 of Sending email using CDOSYS ( THE REAL DEAL ) I was able to finally get email to send!
Method 3 ( Using remote mail server )
<% Dim ObjSendMail Set ObjSendMail = CreateObject("CDO.Message") 'This section provides the configuration information for the remote SMTP server. ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network). ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="mail.yoursite.com" ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False) ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 ' If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password. 'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication 'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="somemail@yourserver.com" 'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="yourpassword" ObjSendMail.Configuration.Fields.Update 'End remote SMTP server configuration section== ObjSendMail.To = "someone@someone.net" ObjSendMail.Subject = "this is the subject" ObjSendMail.From = "someone@someone.net" ' we are sending a text email.. simply switch the comments around to send an html email instead 'ObjSendMail.HTMLBody = "this is the body" ObjSendMail.TextBody = "this is the body" ObjSendMail.Send Set ObjSendMail = Nothing %>
In addition to what you see here there are plenty of properties you can add to these examples.
Here are a few examples.Carbon Copy
ObjSendMail.CC = “someone@someone.net”Blind Carbon Copy
ObjSendMail.BCC = “someone@someone.net”Send Attachment (we hard code it here, but you could specify the file path using Server.Mappath as well)
ObjSendMail.AddAttachment “c:\myweb\somefile.jpg”and a ton of other things you can do…
[Source]
Pages I found useful during this hurdle:
- CDOSYS or CDONTS, Which Will It Be?
- Send via ASP Page w CDONTS – Mail Stuck In SMTP Queue – Please help!
- Localhost mail stuck in QUEUE
- Mail Stuck in Queue Folder – IIS SMTP Virtual Server – Windows XP Service Pack 2 This one advised adding two crlf’s to the end of email.
See also Microsoft’s CDOSYS Documentation.
The final hurdle is rewriting their document management system. Presently, they have an admin piece that uploads documents to a single directory. The documents are then accessible to their customers. They want the ability to classify those documents. The approach will be to allow the documents to live in subdirectories representing the categories. This should be interesting.
1 comment so farOf Being Dad September 22, 2007 4:45 pm
Posted by Doug McCaughan in : Amy, Daily Life, Family, Of Being DadI jumped on the trampoline with Amy today. We had a blast! My poor head and body didn’t handle it that well. We become sedentary and our bodies uncomfortable with such motions. I’ll have to do it more often! We then went exploring the property and discovered a hole in the ground that we guess must be where a raccoon or skunk lives. We walked down into the dry creek for an inspection. Amy has never done that before and was very amused! While I was inspecting the largest tree on our property, I disturbed a nest of ants and got bit by something. I think they are carpenter ants. Looks like I need to call the Agriculture Extension Agent for a recommendation on a tree doctor. I’d hate to lose that tree! I think I’d cry then sell the house.
Amy and I had a great time outside and she cheerfully requested another exploration and "hike" tomorrow.
add a commentWARNING ON BLOGRUSH! September 22, 2007 10:59 am
Posted by Doug McCaughan in : Announcements, Blog, Daily Life, Of Interest, Publishing, TechnologyI was reading 99 Ways to Promote Your Blog for Free and liking the suggestions. Perhaps it would be fun to promote a little extra traffic to the site. I despise watching websites get overloaded with Javascript widgets and gizmos. However, I am guilty of doing that to Reality Me. It is bogged down with useless, behind the scenes Javascript. My list of round tuits includes cleaning up Reality Me and Domestic Psychology. Things like RobotReplay and PhpMyVisites are no longer of use to me but they remain behind the scenes slowing the site down. The Twitter widget and the MyBlogLog widget I find enhancing to the functionality of the site. I see Google Analytics as a necessary evil and I still debate the value of Adsense on a blog such as Reality Me (although apparent it protects – Can someone help me find that citation? I think Michael Silence carried it a while back. Some law was passed saying that if you run ads on your website you are protected the same was as traditional journalists.).
When I read 99 Ways to Promote Your Blog for Free, BlogRush was in the number one or two position. I should have taken a warning when I noticed the author was not using a referral link. Today I noticed that the Javascript code I put in my sidebar to validate Reality Me with Blogrush had changed from a box of links to other sites to become a Google Adsense box. Now, I have Google ads that run on Reality Me (when the ad isn’t encouraging you to buy the shirt off Cathy’s back) so I think Blogrush put me in danger of being in violation of my TOS with Google. Granted, I was supposed to read the Blogrush TOS and I’m sure they revealed that putting ads on my site is part of the agreement. But I do not agree with that! So I will be parting company with Blogrush. I wonder what is in the #3 position on 99 Ways to Promote Your Blog for Free?
2commentsYesterday’s Butt Kicking Continues September 22, 2007 7:08 am
Posted by Doug McCaughan in : ASP, Daily Life, Programming, TechnologyYesterday’s morning R&D centered around trouble shooting an SMTP problem with a Windows2003 server and ASP. Basically, I don’t get the error on my development server, which is still a Windows2000 machine. That means it could be code or server setup. The problem manifests itself when an attempt is made to send an email after a form is submitted.
CDO.Message.1 error ‘80040220’
The “SendUsing” configuration value is invalid.
This error message is all over Google (see also) (remember to use Blingo – aff link!).
I solve this in the next 2 hours!
Update: Why does Google continue to index www.experts-exchange.com?! Never click anything that is a link to www.experts-exchange.com! They obviously understand SEO really well.
Update: Troubleshooting thus far.
- Contacted the web host and explained that I think the server is not configured correct since emailing through telnet seemed to fail (but I might have done something wrong). Tech support explained that although they host the website that another company hosts the email. Excuse me? And that has exactly what to do with sending an email from asp through localhost? Here’s another testing through telnet instructional.
- Wow! SMTPDiag is fantastic. I’ve used it before but sort of put it out of my mind until now. It returns "failed to connect to the domain controller Error: ‘8007054b"
- How to test outbound mail flow with a file in the Pickup folder
- Initially looked like ColdFusion could send from the domain that ASP could not then I realized someone has changed cfmail to use an external mail server. Wonder how I would do that with ASP.
- After reading "SendUsing" configuration value is invalid (80040220), and access privilege problems caused by Exchange 2000 SP3, and how to test the SMTP service, and Troubleshooting email, the telnet way, and Troubleshooting IIS SMTP, and Testing email using RFC-822 and the pickup folder, I finally returned to reading all the comments in CDOSYS or CDONTS, Which Will It Be? to discover an astute comment by Scott Forsyth that this is indeed a permissions error and fixed by searching google for metaacl.vbs to discover these two technotes: ACLs and using MetaACL for metabase ACL permission changes (for understanding) and The MetaAcl tool for modifying metabase permissions on the IIS Admin Objects is available (for the vbs packaged within a self-extracting archive)
Title: The “SendUsing” configuration value is invalid in Windows 2003
Name: Scott Forsyth
Date: 3/27/2006 10:10:04 AM
Comment:
Hi Monde,On Windows Server 2003, if you don’t specify the default smtp server, it needs to obtain that from the IIS metabase. That isn’t allowed by default in IIS6, but you can add it with metaacl.vbs. Google and download a copy of metaacl.vbs and the run the following:
cscript metaacl.vbs “IIS://Localhost/smtpsvc” IIS_WPG RE
cscript metaacl.vbs “IIS://Localhost/smtpsvc/1” IIS_WPG REThis will give the IIS_WPG group read permissions to the smtpsrv node so that you’ll be able to obtain the default SMTP server without specifically setting it in code. This will often resolve the error that you have run into.
[Source]
Now, all of that said, only hurdle one has been jumped. My error message of "The "SendUsing" configuration value is invalid." is gone but mail is getting stuck in //Inetpub/mailroot/Queue. At least it is not going to the Badmail folder. Brief break then onto hurdle two.
1 comment so farDear Technical Writers September 22, 2007 6:25 am
Posted by Doug McCaughan in : Book / Magazine, Programming, Publishing, TechnologyIf you are writing a reference manual on a programming language, please, I beg you, include "Hello World" in the index!
add a commentWhat do I do? September 22, 2007 6:02 am
Posted by Doug McCaughan in : Book / Magazine, Daily Life, Programming, Publishing, TechnologyYesterday I typed frantically for 20.5 hours straight. I am only going to count 12 hours of those since I broke for lunch and 3:30am to noon did include a lot of R&D. Let’s assume I type 60 words a minute. So 12 hours times 60 minutes equals 720 minutes. 720 minutes times 60 words = 43200 words.
The average length of a novel is 60000-100000 words. [Source]
65000+ [Source]
12,500; 15,000; 62,500; or 75,000 [Source]
So even if we cut my 43,200 words in half for 21,600 words it looks like I am well on my way to writing a novel in a day or two. Of course, we could add in the other 8.5 hours of typing for another 30,600 words plus the 43,200 totaling 73,800! A novel in a day! What does Stephen King make per book?
add a commentHappy Birthday Dean! September 21, 2007 8:31 pm
Posted by Doug McCaughan in : Daily Life, FamilyMy younger brother celebrated another year today! Happy Birthday! I remember in my early teens going to a shoe store and having our feet measured. The shoe salesman spoke the sizes and said the larger number went with my younger brother’s foot! Absurd! I corrected and told him he got the sizes backwards to which he explained he didn’t. I finally came to terms with my brother’s foot being bigger than mine and when he grew taller than me I could accept that too. I’ve just never understood how my younger brother got to be older than me!
add a commentSeparating Consultants from Employees September 21, 2007 9:36 am
Posted by Doug McCaughan in : Daily LifeWhat separates a consultant from an employee? If I were an employee there’d be an IT guy fixing this server configuration.
add a commentToday’s Mystery Error Message September 21, 2007 8:28 am
Posted by Doug McCaughan in : ASP, Programming, TechnologyI have a little ASP application that works fine on my development server. On the production server I get:
CDO.Message.1 error ‘80040220’
The “SendUsing” configuration value is invalid.
These are the things that make web application development a bit maddening.
1 comment so farOh! That’s why I hurt. September 20, 2007 10:44 pm
Posted by Doug McCaughan in : Daily Life, Health, JugglingMy forearms have had a fairly constant burning pain the past couple of days. I assumed it was to over typing. They feel like the muscle wants to pull from the bone. It suddenly dawned on me today why! I have formed a habit of juggling in the parking lots while waiting at the schools for the students to dismiss from their activities. Specifically, I’ve started putting 15 minutes of juggling in everyday while waiting to pick Amy up from kindergarten. The juggling relaxes me and I feel my control really coming back strong! I’ll be juggling 6 or 7 bean bags in a few weeks.
add a commentMySQL Took Us Halfway September 20, 2007 4:58 pm
Posted by Doug McCaughan in : MySQL, Programming, TechnologyI’m very disappointed that the MySQL Migration Toolkit is unidirectional. It will take a variety of databases and bring the structure and data into MySQL but won’t go the other way. I know it doesn’t seem to be in MySQL’s best interest to create a tool that would port away from their product but it really would serve them. Guess I need to see what DTS can do.
add a commentLife as a Coder September 20, 2007 4:48 pm
Posted by Doug McCaughan in : Daily Life, Programming, TechnologyWriters get writer’s block. Programmers get coder’s block. Breaking the block is the same. Just do it! Writer’s must write; Coders must code. Time to set the blocked problem aside and coding something simple and fun!
1 comment so farDo you see the dirty picture? September 20, 2007 4:12 pm
Posted by Doug McCaughan in : Of Interest, Publishing, VideoAnyone remember the phallus on the cover of the Little Mermaid? Like the dolphins, our eyes are trained to see beyond the innocent pictures. I bet we see more raunch in Disney flicks and kids shows than we give the artists credit. (link broken again)Watch an artist start with an apparent dirty picture and make it innocent. (could be construed as NSFW but it shouldn’t be)
Update: Youtube killed the video but you can find it by searching Blingo (aka Google with prizes) for "ne to chto podumali". I’ve also updated the link.
Update: link updated.
1 comment so farIndia Outsources to the United States September 20, 2007 4:10 pm
Posted by Doug McCaughan in : Economy, Touchy SubjectsWell, soon.
add a commentThe dollar dropped to record lows through the $1.40 level against the euro on Thursday as the US currency continued its slide following the Federal Reserve’s decision to cut interest rates earlier in the week. [Source]
Spectators to the abolishment of freedom September 20, 2007 2:23 pm
Posted by Doug McCaughan in : Activism, Politics, Touchy Subjects, United StatesI just watched the University of Florida student getting tasered and read the account of the falsification of the police report. I am appalled! The video indicates no wrong doing! The questions seemed appropriate and Kerry seemed willing to answer. The growing abusive police state in this nation must be contained! What growing abusive police state? The abusive police state that commands on of our military personnel, who put his life at risk to protect your freedoms, to stand up so the officer can shoot him. The students who sat idly by should have risen from their chairs when the officers stood threateningly behind the student. They should have made a human barricade and assured the freedom of speech that our forefathers gave their lives for during the Revolutionary War. How we dishonor them! Our government exists by the will of the people and if the government is stepping out of line then the people must step up! Besides, what’s college if you haven’t been arrested at a protest?
Easier said than done you say? I would have sat idly by also if I were there you say? You don’t know me very well then. All that said, I acknowledge that maybe there were other circumstances not conveyed in the video or the media that led to this event. Perhaps the student had an altercation with the police earlier.
As Naomi Wolf has rightfully pointed out, the tasering of Andrew Meyer will be remembered as a watershed moment in American history. That much is certain. The only thing that remains to be seen is how we, as Americans, react to it. Will we sit passively by while our Constitution and our Democracy are murdered right before our eyes?
…
The choice is clear: either we fight fascism right now with all our power, or we will be the next ones on the ground with a policeman’s knee on our throats and 50,000 volts of electricity coursing through our bodies.
[Source]
Update: Is that officer laughing?!
8comments