Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output TXT File to eMail 1

Status
Not open for further replies.

xBaseDude

MIS
Jan 31, 2002
357
US
What would I need to send email from 26?

I know how to create a txt file, from fpw...but how would I handle address,subject,from lines?

Can anyone recco a good mail server that would work well with FPW26. It would be great if I could test this.

Regards - Wayne
 
Try Eudora
Price = Free
David W. Grewe
Dave@internationalbid.com
 
Thank-You for the tip. I have Eudora on CD just never installed it. I was wondering how the call would go....

I'm thinking /Run eudora.exe, my_to, my_from, my_subject, my_text.txt_file.

Could someone explain to me how I would make this call. Please be specific in your example as I am a little thick.

Google had plenty of explanations for MACs (!?!) but not many for FPW26 and Eudora.

TIA - Wayne
 
Step one = Build a dos text file.
for this example I'll name it emm.msg
place the TO: , From:, Subject:, CC: BCC:, Attach: lines in it"
Place one blank line in it.
Place the body of the message in ASCII or HTML code.
save the text file

Step 2 call eudora
gcEmailExe = IsFileInReg("Eudora.exe")
llReturn = runexe(gcEmailExe , "emm.msg")

David W. Grewe
Dave@internationalbid.com
 
Dave...thanx...but you're in the 26 forum, and those commands weren't invented yet [g].

Regards - Wayne
 
Those functions were written to call Windows API routines. They will work on a Win95 & up platform. How do I know that, Because I wrote them in a FPW2.6 enviroment on a WIN95 computer and I'm still using them today in VFP6 in Win98 & ME.


David W. Grewe
Dave@internationalbid.com
 
OK, call it a brain fart, I was reminded we wrote those routines after we converted to VFP3 and they do not work in 2.6. So I stand corrected. so try this
run /n3 "c:\program files\qualcomm\eudora\eudora.exe" c:\temp\emm.msg
David W. Grewe
Dave@internationalbid.com
 
is this for a user or the e-mail has to actually be sent immediately??

if by a user ...

PRIVATE cFile, hUrl
cFile = SYS(2023) + "\" + SYS(3) + ".url"
IF FILE( m.cFile )
DELETE FILE ( m.cFile )
ENDIF
hUrl = FCREATE( m.cFile )
IF m.hUrl < 0
WAIT WINDOW &quot;Unable to create internet shortcut.&quot;
RETURN
ENDIF
= FPUTS ( m.hUrl, &quot;[InternetShortcut]&quot; )
= FWRITE( m.hUrl, &quot;URL=mailto:Sales <sales@domain.com>&quot; )
= FWRITE( m.hUrl, &quot;?subject=Whatever subject you like&quot; )
= FWRITE( m.hUrl, &quot;&body=%0A&quot; )
= FWRITE( m.hUrl, &quot;This is line one of the message%0A&quot; )
= FWRITE( m.hUrl, &quot;This is line two of the message%0A&quot; )
= FFLUSH( m.hUrl )
= FCLOSE( m.hUrl )

RUN /N2 START &cFile

The default e-mail client is now open with this e-mail created ... all the user has to do is click Send! :)
Steven S
Professional Foxpro developer for DOS/Windows/Unix platforms since 1989.
clogic@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top