WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Postie

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Postie and Mail Server Problems

Keywords:    10061 10049 mail server problems microsoft error list url

Question:

I am looking for a way to have WB check my inbox in Lotus Notes for certain messages. The subject field of the messages I need to read from are all the same. I have messed around with the Postie Extender with not much luck. I get this error when I try to run the script:
3057: Variable could not be converted to a valid number
Here is the script that I have:
AddExtender("WWPST32I.DLL")
host="mailserver"
fromaddr="b00@sdf.com"
userid="b00"
password="down"
port=""
msgnumber="" ; get all msgs
extractfile=""
pattern="LAN" ; get msgs with "Smilie" in subject field
nopattern="TEST" ; subject must not contain "Frownie"
mailbox="" ; this option only available with IMAP4
flags="" ; SMTP is the default flag

kInit(host,fromaddr,userid,password,port)
mymail=kGetMail(msgnumber,extractfile,pattern|nopattern,mailbox,flags)
message("Mail Messages", mymail)
After I get WB to get the emails that only have the line I am looking for I need it to use that information to created a new user on the network.

I get the error from the line:

mymail=kGetMail(msgnumber,extractfile,pattern|nopattern,mailbox,flags)
I know how to add the user with WB but wanted to auto it so it got the info from the mail server and did it for me.

Answer:

  1. On which line do you get the 3057 error?
  2. Postie grabs the email from the mail server; it has no interaction with your mail client.
  3. To create a new user, see the Win32 Network Extender.HLP file. See the functions wntUserAdd and wntUserAddDat.
  4. Change:
    mymail=kGetMail(msgnumber,extractfile,strcat(pattern,"|",nopattern),mailbox,flags)
    

Question (cont'd):

OKay that does get me closer but all it will return now Marty is "Missing From Address" That is what the message returns. Any ideas, thanks!!

Answer:

host="mailserver" 
That also looks suspicious. Look at some emails you get from the ourside world. Look at the headers. your SMTP servers *may* be in that list someplace.

Why don't you post the code as you now have it.

Question (cont'd):

OKay here you go here is the code I have so far. Like I said before I have the send mail working fine, this on the other hand is not.
AddExtender("WWPST32I.DLL")
host="FD01LN01"
fromaddr="b08mks@fsg.com"
userid=""
password=""
port=""
msgnumber="" ; get all msgs
extractfile="mail.dat"
pattern="LAN ACCESS REQUEST FORM" ; get msgs with "Smilie" in subject field
nopattern="" ; subject must not contain "Frownie"
mailbox="" ; this option only available with IMAP4
flags="h" ; SMTP is the default flag




kInit(host,fromaddr,userid,password,port)
mymail=kGetMail(msgnumber,extractfile,strcat(pattern,"|",nopattern),mailbox,flags)

message("Mail Messages", mymail)

Answer:

You will need to specify a user name and password to get mail....

And your mail host still looks suspicious.

Question (cont'd):

I didn't have to provide a user name and password when I used the send mail. Does the getmail need a pw and user to work? That is the name of my mail server.

Answer:

The mail server needs to know who you are before it will surrender the contents of your mailbox to you. When you're sending mail out, the security risk is lesser, although some mail servers still expect you to authenticate in order to prevent spamming.

Question (cont'd):

Okay made it a little closer, this is the error I get now:
Could not connect to http://fd01ln01/mail/mstewart.nsf:110,error-10049
I can connect to this using MSIE 5.0 without any trouble.

Answer:

10049 The requested address is not valid in its context.

Boy. What is that URL?

I still suspect mail host name problems, but just plain mailserver *could* be correct also.

Question (cont'd):

This is what my code looks like now. The host has change do to the fact that this is what I use to connect to mail outside of the Lotus Notes app itself. Like I said before I can type http://fd01ln01/mail/mstewrt.nsf into MSIE and it will prompt me for my user name and PW. I guess from other than that I am not sure how to get to a Lotus Notes mail file than that.
AddExtender("WWPST32I.DLL")
host="http://fd01ln01/mail/mstewart.nsf"
fromaddr="b08mks@fsg.com"
userid="stewart"
password="test"
port=""
msgnumber="" ; get all msgs
extractfile="mail.dat"
pattern="LAN ACCESS REQUEST FORM" ; get msgs with "Smilie" in subject field
nopattern="" ; subject must not contain "Frownie"
mailbox="" ; this option only available with IMAP4
flags="" ; SMTP is the default flag

kInit(host,fromaddr,userid,password,port)
mymail=kGetMail(msgnumber,extractfile,strcat(pattern,"|",nopattern),mailbox,flags)

message("Mail Messages", mymail)

Answer:

Well. It's wrong. Send me an email at: marty@winbatch.com and I can look in the headers and possible divine what the correct mail server to use is.

Try #1 try host="fddlnint06.fds.com" Try #2 host="fddlnint06" See email for next step.

Question (cont'd):

Thanks Marty for all your help! That did not work either. I am not sure what to do from this point. I do get a different error if I use fd0lln01 as the host, error-10061. If it wasn't Lotus Note server this would be easier. Thanks again for all your help!

Answer:

  1. Machine did not like you. But you reached it.
  2. To look up those kinds of errors see..
    http://msdn.microsoft.com/library/psdk/psdkref/errlist_9usz.htm
    
    BOOKMARK the site.
  3. We need to look at headers for a email you received. Can you use Eudora or Outlook EXPRESS as your email program?
Next look at the message I emailed you, look at the headers and try to figure out what your POP3 or IMAP4 server is.

Also look in account settings for a POP or IMAP server name.

To determine the appropriate Mail server.....

Open the control panel applet 'Mail and fax'
Start->Settings->Control Panel, then select the Mail applet. 
If you get the dialog 'Window messaging settings', select the 'Services' tab. Double click on the 'internet mail' item in the list.

You should then see new dialog titled 'Internet Mail'. What does it say next to the 'Internet mail server'???

Conclusion:

I just got a bounce from your mail server. I had responded to the test message yu emailed me earlier. However it seems the servers on your end are unhappy

Message is:


    **********************************************

    **      THIS IS A WARNING MESSAGE ONLY      **

    **  YOU DO NOT NEED TO RESEND YOUR MESSAGE  **

    **********************************************


The original message was received at Thu, 30 Nov 2000 11:50:41 -0800 (PST)

from dhcp187.windowware.com [207.195.133.187]


   ----- The following addresses had transient non-fatal errors -----



   ----- Transcript of session follows -----

... Deferred: Connection refused by fdlnint02.fds.com.

Warning: message still undelivered after 4 hours

Will keep trying until message is 5 days old





Article ID:   W14783
File Created: 2017:07:28:12:58:36
Last Updated: 2001:11:08:11:39:58