Normal Topic @SendMail() question (Read 842 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
@SendMail() question
Aug 13th, 2007 at 8:10pm
Print Post Print Post  
Is there a method for me to send multiple attachments with @SendMail()?

Can multiple file names be included somehow in the attachment section of  @SendMail() syntax?

I presently have a variable, Vattachment that specifies the file I want to attach to my e-mail. I have had great results with the use of @SendMail() when only 1 document/file is to be attached, however there is often a need to attach multiple documents/files to the email.

I was trying to use some of the Sbasic shell, and CreateAProcess commands to run winzip to create the single file containing all selected files from a selection box prior to using @SendMail(),  However this then relies on the user having the same version of winzip on there machine. I would rather not open that can of worms if I do not have to.

All thoughts and suggestions appreciated.

Thanks,
Robert
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: @SendMail() question
Reply #1 - Aug 13th, 2007 at 8:29pm
Print Post Print Post  
Hello Robert,

Have you tried using a semi-colon to seperate the file names/paths?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: @SendMail() question
Reply #2 - Aug 13th, 2007 at 9:14pm
Print Post Print Post  
Quote:
Have you tried using a semi-colon to seperate the file names/paths?

-Ray


Ray,

Is it supposed to work with a semi-colon delimited string?

I originally tried the code below  on my test button. Only doc1 was received. If you think it should work with semi-colon delimited string I will go back and play some more. I had very little knowledge of @Sendmail when I was playing with it so I was just guessing and when it did not work I used the @shell commands I was comfortable with and winzip.

var b as int
Var Vattachment as string
Var Vsubject as string
Var VFromEmail as string
Var VpropertyBrokerEmail as string
Var vbody as string

Var Vattach1 as string
Var Vattach2 as string


Vsubject= "test multiple docs"
VFromEmail = "bob-scott@usa.net"
VpropertyBrokerEmail = "bob-scott@usa.net"
vbody = "testing multiple body"



Vattach1 = "PMI\Quotes\doc1.rtf"
Vattach2 = "PMI\Quotes\doc2.rtf"
     
Vattachment = Vattach1 +";"+ Vattach2

Writeln(Vattachment)

b=@SendMail("smtp.postoffice.net", vsubject , VFromEmail, VpropertyBrokerEmail, "", "", vbody, "Bob-scott@usa.net", "PasswordHere", Vattachment)

Thanks for the help Smiley
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: @SendMail() question
Reply #3 - Aug 13th, 2007 at 9:31pm
Print Post Print Post  
Ray,

YES - A semi-colon seperated string does work !!!!!!

Thank you, Thank you, Thank you.

I love my Sbasic commands Smiley
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: @SendMail() question
Reply #4 - Aug 14th, 2007 at 12:34pm
Print Post Print Post  
The list of attachements can be Comma or Semi-colon seperated for future reference.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged