×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Send email with attachment from AC4.3
2

Send email with attachment from AC4.3

Send email with attachment from AC4.3

(OP)
We have a requirement to generate a csv file from AC4.3 (we can do this) and send this file as an attachment with an email.
Have any of you done this, or have you any suggestion of lines of approach? Many thanks for your time.
Tracey

RE: Send email with attachment from AC4.3

Dear Traceyr

Option 1
<--------------------------------------------
Have a look at http://www.bysoft.se/sureshot/clemail/ it is a command line emailer that used with the correct parameters can email with file attachments.

You can create an action of type executable enter the appropriate information

or

via a script calling the amActionExec() function supplying the correct parameters

Option 2
<-------------------------------------
You could also take a look at http://www.alchemy-lab.com/products/automail/cmdline.html which is another commandline based emailer

Pricing is
Program price is US $35 for personal
and US $50 for business license


I hope this is of some help

Jason Thomas
AssetCenter Consultant
Jason Thomas Consultancy Limited

RE: Send email with attachment from AC4.3

Jasonic is right, but you could use a VBscript as commandline emailer. This one works for Groupwise and takes 4 parameters: emailadress,subject,body, attachment.
It is rudimentary (pathetic errorchecking), but just to give you an idea:


Dim ToAddress
Dim MessageSubject
Dim MessageBody
Dim MessageAttachment
Dim ol, ns, newMail

ToAdress=wscript.arguments(0)
MessageSubject=wscript.arguments(1)
MessageBody=wscript.arguments(2)
MessageAttachment=wscript.arguments(3)

' connect to Groupwise

Set ol = WScript.CreateObject("Groupwisecommander.Application")
'use the following comment for outlook (untested).
'Set objOutlook = CreateObject("Outlook.Application")

Set ns = ol.getNamespace("MAPI")

Set newMail = ol.CreateItem(olMailItem)
newMail.Subject = MessageSubject
newMail.Body = MessageBody & vbCrLf

' validate the recipient, just in case...
Set myRecipient = ns.CreateRecipient(ToAddress)
myRecipient.Resolve
If Not myRecipient.Resolved Then
   MsgBox "Unknown recipient"
Else
   newMail.Recipents.Add(ToAddress)
   newMail.Attachments.Add(MessageAttachment).Displayname = "csv"
   newMail.Send
End If

Set ol = Nothing
 


save this as f.i. Postman.vbs and call it like this:

postman.vbs "elvis,presley","don't be cruel",,c:/singalong.txt

You would easily find a better script than this if you 'd google on Outlook.Application

RE: Send email with attachment from AC4.3

(OP)
Thanks, Siep. That's a useful example!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close