Page 1 of 1 1
Topic Options
#141407 - 2005-06-09 04:22 PM Using Blat
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
'ello Dudes

I have just done a script to send an email containing a txt file using blat.exe, everything sends fine but no document is attached.. the script is below

Code:

Break on

$mailhost = 'mailserver'
$Attachment1 = '"%systemdrive%\temp\IE6Upgrade.txt"'
$Attachment = "c:\temp\SP6Upgrade.txt"
$sender = 'aaron.shaw@@neverumind.co.uk'
$recipient= 'Uber@@neverumind.co.uk'
$mailLine = 'C:\temp\blat.exe $Attachment -to $recipient -server $mailhost -subject "Please Update" '
$mailLine = $mailLine+'-body "blah ablah balajsdsd" -f $sender -q'
Shell $mailLine




Doesnt work or does

Code:
 


Break on

$mailhost = 'mailserver'
$Attachment1 = '"%systemdrive%\temp\IE6Upgrade.txt"'
$Attachment = "c:\temp\SP6Upgrade.txt"
$sender = 'aaron.shaw@@neverumind.co.uk'
$recipient= 'Uber@@neverumind.co.uk'
$mailLine = 'C:\temp\blat.exe c:\temp\SP6Upgrade.txt -to $recipient -server $mailhost -subject "Please Update" '
$mailLine = $mailLine+'-body "blah ablah balajsdsd" -f $sender -q'
Shell $mailLine




Can anyone see anythign wrong with it...im scratching my head... Outlook doesnt appear to be doing anything odd...have tested with outlook 97 and 2003

Cheers

A
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#141408 - 2005-06-09 06:39 PM Re: Using Blat
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you sure there is no switch for the attachment?
_________________________
!

download KiXnet

Top
#141409 - 2005-06-09 06:42 PM Re: Using Blat
oobnuker Offline
Getting the hang of it

Registered: 2003-12-09
Posts: 87
Loc: Oxford, CT
I always do the install routine for blat, or write the following keys:
Code:

HKLM\SOFTWARE\Public Domain\Blat
Sender=sender@somewhere.com
SMTP Port=25
SMTP Server=myserver
TRY=5



And the command line BLAT FILENAME.TXT -to %recipient% -subject %subject%, always works for me. It basically places the contents of FILENAME.TXT as the body of the message.
_________________________
-- oobnuker - .KIX hack - no really.

Top
#141410 - 2005-06-09 06:52 PM Re: Using Blat
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, that's not correct.
as he wants an attachment.

iirc, I never got the attachment part working, but I never really needed it either.
_________________________
!

download KiXnet

Top
#141411 - 2005-06-09 06:55 PM Re: Using Blat
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
It said in the notes that came with it that the executable was all you needed

Quote:




And the command line BLAT FILENAME.TXT -to %recipient% -subject %subject%, always works for me. It basically places the contents of FILENAME.TXT as the body of the message.






Well that is pretty much what ive done above......ahhh hang on a sec.....



It includes the text file content in the message body? i was using a blank file

I thought it actually attached it.....

lol smeg

Thanks for replies

Aaron
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#141412 - 2005-06-09 06:58 PM Re: Using Blat
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
I dont mind really if its attached or in the body of the message its all good.

Thanks again
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#141413 - 2005-06-09 07:02 PM Re: Using Blat
oobnuker Offline
Getting the hang of it

Registered: 2003-12-09
Posts: 87
Loc: Oxford, CT
Quote:

so, that's not correct.
as he wants an attachment.

iirc, I never got the attachment part working, but I never really needed it either.




Yeah, I was just offering up my experience in hopes that it might help him out.
_________________________
-- oobnuker - .KIX hack - no really.

Top
#141414 - 2005-06-09 07:02 PM Re: Using Blat
oobnuker Offline
Getting the hang of it

Registered: 2003-12-09
Posts: 87
Loc: Oxford, CT
Quote:

I dont mind really if its attached or in the body of the message its all good.

Thanks again




So it works now? Awesome.
_________________________
-- oobnuker - .KIX hack - no really.

Top
#141415 - 2005-06-09 07:02 PM Re: Using Blat
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, cool then.
_________________________
!

download KiXnet

Top
#141416 - 2005-06-10 06:53 AM Re: Using Blat
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Do we need to update the Examples in the FAQ Section?

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#141417 - 2005-06-10 09:35 AM Re: Using Blat
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
well it does say

Quote:



Blat - File Attached..






Rather than File content included (or somthing like that...)
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#141418 - 2005-06-15 01:51 PM Re: Using Blat
oobnuker Offline
Getting the hang of it

Registered: 2003-12-09
Posts: 87
Loc: Oxford, CT
I had a need to send a string as the body of the email and I didn't want to have to write it out to a file, so I set down to figure out the proper command line this morning.

Code:

BLAT - -body "your text here" -to Recipient -f Sender -subject "Subject Here" -server SMTPSERVER -port SMTP Port -try Number of tries



This works for me. Note the single "-" - that was the trick that got it working for me.
_________________________
-- oobnuker - .KIX hack - no really.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.061 seconds in which 0.022 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org