Jump to content

Smtp Mailer That Supports Html And Attachments.


Jos
 Share

Recommended Posts

  • Developers

Hi guys when I tried to use the code I had error

$ObjEmail.Send

$ObjEmail.Send^ERROR

Error: The requested action with this object has failed.

PS.Sorry to rise up all threads.

You didn't use the Com error handler portion of the posted code..

That should tell you more about why the send fails....

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I'm having problems with this, I have this in the code:

$rc = _INetSmtpMailCom("smtp.mail.yahoo.com", "name", "email1@yahoo.ca", "email2@yahoo.ca", "subject", "message", "", "","", "email1username", "email1password")

I get error :

Error code:2 Description:The transport failed to connect to the server

Any help is appreciated, thanks

Link to comment
Share on other sites

  • Developers

I'm having problems with this, I have this in the code:

$rc = _INetSmtpMailCom("smtp.mail.yahoo.com", "name", "email1@yahoo.ca", "email2@yahoo.ca", "subject", "message", "", "","", "email1username", "email1password")

I get error :

Error code:2 Description:The transport failed to connect to the server

Any help is appreciated, thanks

Does it work when you use the same Servername/Userid/Password in outlook express ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • 4 weeks later...

Great script, I do have one minor question. When I beta run the script I keep getting an error "C:\Program Files\AutoIt3\beta\Autoemail.au3(34,65) : ERROR: _PathFull(): undefined function.

$S_Files2Attach[$x] = _PathFull ($S_Files2Attach[$x])"

The script will complete and run fine even including the attachment when there is one, just looking for some illumination as to what I might have incorrect.

Thanks in Advance,

Badger

Link to comment
Share on other sites

  • Developers

Great script, I do have one minor question. When I beta run the script I keep getting an error "C:\Program Files\AutoIt3\beta\Autoemail.au3(34,65) : ERROR: _PathFull(): undefined function.

$S_Files2Attach[$x] = _PathFull ($S_Files2Attach[$x])"

The script will complete and run fine even including the attachment when there is one, just looking for some illumination as to what I might have incorrect.

Thanks in Advance,

Badger

You probably get an error when running from SciTE ?

Done any updates lately for SciTE?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • 1 month later...

#Include <smtp.au3>
$s_SmtpServer = "smtp.gmail.com"
$s_FromName = "Azkay"
$s_FromAddress = "Azkay@gmail.com"
$s_ToAddress = "azkay-s@hotmail.com"
$s_Subject = "Okay"
$as_Body = "Test."
$s_AttachFiles = ""
$s_CcAddress = ""
$s_BccAddress = ""
$s_Username = "azkay.s@gmail.com"
$s_Password = "mypass"
_INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, $s_AttachFiles, $s_CcAddress, $s_BccAddress, $s_Username, $s_Password)
Exit

I get error 1. Why?

EDIT::

### COM Error !  Number: 80020009   ScriptLine: 51   Description:The transport failed to connect to the server.
Edited by AzKay
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

  • Developers

I get error 1. Why?

EDIT::

### COM Error !  Number: 80020009   ScriptLine: 51   Description:The transport failed to connect to the server.
Google uses port 465 and SSL

try it with this version of _InetSmtpMailCom and add the last parameters with 465 and 1.

Moved updated script to first post...

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Gmail uses SSL security, might be the issue...

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

Wow, Very nice! Works. ^^, You have no idea how happy I am, Ive been looking for something like this in over a year, I tryed looking with different languages, none worked, but now ^^.

# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

  • 2 weeks later...

This is really frustrating me, I can't get this to work, there has to be something that I am missing.

global $oMyError = ObjEvent("AutoIt.Error","MyErrorFunc")

_INetSmtpMailCom("smtp.google.com", guictrlread($sender), "mygmailaccount@gmail.com", "abcd@efg.com", "Feedback from: " & guictrlread($sender) , guictrlread($emailbody), "", "", "", "mygmailaccount", "mygmailpassword",465, 1)

oÝ÷ Ù©Ý"G¦­¶)ඬyê뢻ºÚ"µÍÐTSÎ ÌÍÛÓ^T]ÜÜÚXHÙYYÜHXÛ][Û]  ÌÍÛÓ^T]ÌWBLJHOIÝÈH]YÝYXÝ[ÛÚ]ÈØXÝÈZ[YÌÍÛØ[XZ[Ù[ÌÍÛØ[XZ[Ù[

there has to be something obvious that I am missing. I know that $omyret[1] has to be declared, but how and where?

and why isn't the error handler working properly?

[edit]

I am running latest beta, and the latest update for scite4

Edited by orange
Link to comment
Share on other sites

  • 2 weeks later...

I installed the BETA, but when I compile the script I get a lot of errors:

C:\email.au3(3,14) : ERROR: syntax error (illegal character)
    $objEmail.
~~~~~~~~~~~~~^
C:\email.au3(7,41) : ERROR: syntax error (illegal character)
    If $s_CcAddress <> "" Then $objEmail.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\email.au3(8,42) : ERROR: syntax error (illegal character)
    If $s_BccAddress <> "" Then $objEmail.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\email.au3(11,18) : ERROR: syntax error (illegal character)
        $objEmail.
~~~~~~~~~~~~~~~~~^
C:\email.au3(13,18) : ERROR: syntax error (illegal character)
        $objEmail.
~~~~~~~~~~~~~~~~~^
C:\email.au3(20,26) : ERROR: syntax error (illegal character)
                $objEmail.
~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\email.au3(28,14) : ERROR: syntax error (illegal character)
    $objEmail.
~~~~~~~~~~~~~^
C:\email.au3(33,18) : ERROR: syntax error (illegal character)
        $objEmail.
~~~~~~~~~~~~~~~~~^
C:\email.au3(38,18) : ERROR: syntax error (illegal character)
        $objEmail.
~~~~~~~~~~~~~~~~~^
C:\email.au3(41,14) : ERROR: syntax error (illegal character)
    $objEmail.
~~~~~~~~~~~~~^
C:\email.au3(43,14) : ERROR: syntax error (illegal character)
    $objEmail.
~~~~~~~~~~~~~^
C:\email.au3(46,26) : WARNING: $oMyRet: possible used before declaration.
        return $oMyRet[1]
~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\email.au3(53,31) : ERROR: syntax error (illegal character)
    $HexNumber = Hex($oMyError.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\email.au3(55,41) : ERROR: syntax error (illegal character)
    $oMyRet[1] = StringStripWS($oMyError.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\email.au3(56,90) : ERROR: syntax error (illegal character)
    ConsoleWrite("### COM Error !  Number: " & $HexNumber & "   ScriptLine: " & $oMyError.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\email.au3(2,40) : ERROR: ObjCreate(): undefined function.
    $objEmail = ObjCreate("CDO.Message")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\email.au3(18,65) : ERROR: _PathFull(): undefined function.
            $S_Files2Attach[$x] = _PathFull ($S_Files2Attach[$x])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\email.au3 - 16 error(s), 1 warning(s)

Does anyone know how to fix this?

Link to comment
Share on other sites

Sorry for kicking so quickly, but does anyone know this? I can't figure out what's wrong, but I would like to finish my script which needs this smtp script. Thanks in advance!

Edited by Carl
Link to comment
Share on other sites

  • Moderators

How do u use this.....please make a guide to show you what you have to write in every variable...because it gives me lots of errors and I donno how to use this...:whistle:

A guide? LOL, there already is one... It's called the help file... A suggestion is that if you can't get this to work (you're v3.1.1 is outdated (v.3.2 is released)).

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Developers

How do u use this.....please make a guide to show you what you have to write in every variable...because it gives me lots of errors and I donno how to use this...:whistle:

Wouldn't it be a lot easier when you show us what you have and what errors you get ?

We can then help you fix it but only if you promise to write that manual for this UDF after you got things working ... Deal ?

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

I allready have the latest beta....ok the errors were because i changed something in the script...now it's fine but still can't send mail...

Did you see the post just above your last post ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...