| Ticket UUID: | 531231 | |||
| Title: | Error not caught: sendmessage, bad args | |||
| Type: | Bug | Version: | None | |
| Submitter: | nobody | Created on: | 2002-03-18 06:26:29 | |
| Subsystem: | smtp | Assigned To: | mrose | |
| Priority: | 2 | Severity: | ||
| Status: | Closed | Last Modified: | 2002-08-06 07:37:10 | |
| Resolution: | Invalid | Closed By: | mrose | |
| Closed on: | 2002-08-06 00:37:10 | |||
| Description: |
[email protected] writes: I constructed smtp::sendmessage arguments without including an originator/From, which is an error. I was running smtp::sendmessage via 'catch' and got: ****errmsg='can't read "aprops(error)": no such element in array'. Which means the smtp code blew up rather than report the error. Here is where the error occurred in proc sendmessage: puts $::fd_Trace "Originator='$originator'." set addrs [mime::parseaddress $originator] puts $::fd_Trace "addrs='$addrs'." if {[llength $addrs] > 1} { error "too many mailboxes in $who: $originator" } array set aprops [lindex $addrs 0] puts $::fd_Trace "Here#1, array names aprops = [array names aprops]" if {$aprops(error) != ""} { error "error in $who: $aprops(error)" } Here is my runtime diagnostic: Originator=''. addrs=''. Here#1, array names aprops = ****Error: Build_SMTP2='smtp::sendmessage $part -debug 0 -servers {mx02.earthlink.net} -header {Subject {Email from Somebody}} -header {To {"The Somebody Meister" <[email protected]>}}'. ---- I'd also like to note a "gotcha". I first was sending email to two recipients, one at Road Runner NYC, one at Earthlink. It blew up because I was pointing to RR's SMTP server, and it wouldn't "relay" for the Earthlink address. I looked at the doc for smtp::sendmessage, saw that the -servers option would take a list of SMTP servers, and ran it again with both the RR and Earthlink SMTP servers specified. Same error. So, the description of the -servers option is useless in telling the programmer what it's for. I had to look at the source code to see what it actually did. It would be convenient to be able to either pair recipients with their server, or --- best --- be able to give an option saying to use DNS to get MX records for the recipient. One should not have to hard-code SMTP server names into their scripts. That's a ticking time-bomb. | |||
| User Comments: |
andreas_kupries added on 2002-03-19 12:17:39:
Logged In: YES user_id=75003 Clarification: I meant the link "submit new", not the button "submit". For a new item the fields for attaching data will be just above the "submit" button. Good luck with your account. orwellian added on 2002-03-19 12:00:29: Logged In: YES user_id=490034 When I hit "submit", that's it. It says, "Accepted". I'll bet that's the difference between having a login on SourceForge versus not. Gawd, another username/login. Okay, I've registered. When I hit submit, I bet I'll see it this time. andreas_kupries added on 2002-03-19 08:39:10: Logged In: YES user_id=75003 Hm. When I hit "submit new" I come to a form which has the following fields near the bottom: * A checkbox labeled "Check to upload & attach file", * followed by an entry to add the filename (to the right is a browse button). * followed by an entry to describe the file (labeled "File description"). The same fields are available on the page for an existing tracker item. nobody added on 2002-03-19 04:17:49: Logged In: NO [email protected] replies: mtr wrote: # it would certainly help matters if you would provide the # actual command you're invoking instead of saying # everything except that. The actual command is shown. See "Build_SMTP2=". That gets eval'd. AK wrote: # it is better to attach long... The SourceForge form I am using has no "attach" function. andreas_kupries added on 2002-03-19 02:30:26: Logged In: YES user_id=75003 Also note that it is better to attach (long) scripts, error traces and log information to a report instead of placing them inline. It allows to write concise report containing references to the supplemented information. This is not only easier to read, the mail sent by SF are also smaller and there not so much scrolling involved to get and the interesting information. mrose added on 2002-03-18 22:34:26: Logged In: YES user_id=24077 it would certainly help matters if you would provide the actual command you're invoking instead of saying everything except that. | |||
Home
Blog
Docs
Downloads
Tickets
Timeline
Branches
Tags
Wiki