Jump to content
Sign in to follow this  
AAM

How to send .txt file to the email address

Recommended Posts

AAM

How can i email the .txt file.

Share this post


Link to post
Share on other sites
PhoenixXL

as an attachment,

for sending through your gmail account see my signature

orelse search the forum for "SMTP Mailer that supports Attachments" by jos

Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites
water

Which mail program do you use (Outlook ...)?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
JLogan3o13

How can i email the .txt file.

I honestly don't think you could have provided less information if you tried. Please explain in detail what you are trying to accomplish, and with what email application.


√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
AAM

i am using outlook programm.

actually i want to send the .txt file to my email address.

WinWaitActive("Notepad", "")

Send("!s")

WinWaitActive("Save As", "")

Sleep (1000)

; Send the name we found was next in line

Send("C:tempresultsabcd.text")

Sleep(1000)

Send("!s")

By using the above script i can save my .txt file.now i don't know how to send this file to my email address

Share this post


Link to post
Share on other sites
JLogan3o13

When you say "send this file to my email address", do you mean email it to yourself as an attachment, or do you mean email the text file from your address to someone else?


√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
AAM

yes email to me as an attachment.

Share this post


Link to post
Share on other sites
rudi

Hi.

iirc there is an UDF (User Defined Function) that allowes to send email with attachments.

I personally use BLAT.EXE ( -> google). Use the function "FileInstall()" to get a local copy at a temporary location, then use BLAT to send your emails. Fast, reliable, just the "fileinstall()" isn't that nice ;)

Note: with _INetSmtpMail() some mail systems (including Exchange 2010) require the parameter $s_first = -1 to be set, for other mail systems this value is a show stopper. That's the main reason, why I personally use BLAT: it *ALWAYS* works as a charm.

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites
water

You could use my OutlookEX UDF (for download see my signature). There is a wrapper function _OL_Wrapper_SendMail for easy sending of a file.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
AAM

Hi MVP. Is there any way to send an email with file????

Share this post


Link to post
Share on other sites
EmptySpace

If you want only to receive file no matter how then you could use ftp. Its only 4-10 lines of code and you can download .txt from ftp very fast.

Share this post


Link to post
Share on other sites
water

Sure:

#include <OutlookEx.au3>
$oOL = _OL_Open()
If @error <> 0 Then Exit MsgBox(16, "Test", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended)
$sTo = "recipients mail address"
$sSubject = "Subject of the mail"
$sBody = "Body text of the mail"
$sAttachments = "C:\temp\results\abcd.text"
_OL_Wrapper_SendMail($oOL, $sTo, "", "", $sSubject, $sBody, $sAttachments)
If @error <> 0 Then MsgBox(16, "Test", "Error sending mail. @error = " & @error & ", @extended: " & @extended)
_OL_Close($oOL)
  • Like 1

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
AAM

Hi MVP .It doesn't seem to work for me? i got an error message that can't open #include <OutlookEx.au3> and also _ol_open ,_ol_wrapper_sendmail and _ol_close are undefined function.can u please help me with that?

Share this post


Link to post
Share on other sites
water

Did you download OutlookEx.au3 from my signature and unpack the ZIP file to a location where SciTE can find the include?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
AAM

hi Mvp.Actually i realy do not know how to open ur signature?can u please help me?

Share this post


Link to post
Share on other sites
water

Click on the "Download" link in line "OutlookEX (2012-10-07 - Version 0.9.0.0 released) - - - - Wiki", then unpack the ZIP file.

There is a readme file which explains what to do with the content of the ZIP file.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
water

BTW: My name on the forum is "water", my title is "MVP".


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
AAM

Hi Water.i downloded the zipped file and try to extract it but it says that there is no data in it.

Share this post


Link to post
Share on other sites
water

Then your Firewall, AntiVirus software or whatever is blocking zip files.

Can you download the UDF at home and put it on a USB stick?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×