Jump to content

Recommended Posts

  • Developers
Posted

What are these websites in the code for exactly..?? when i try to visit them nothing comes up..??

Happy reading: http://msdn.microsoft.com/en-us/library/ms...(EXCHG.10).aspx

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.
  :)

  • Developers
Posted

Hi! it was working just fine but i got error when use

$AttachFiles = "abb-file001.log"

or

$AttachFiles = "d:\dir_dir\dir-dir\abb-file.log" :unsure:

If code is

$AttachFiles = "file001.log"

it works very good! :P

What's wrong?

Thanks

What information is shown in the Outputpane when you run your script from SciTE?

Jos

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.
  :)

Posted (edited)

I m getting this error ?

### COM Error !  Number: 80020009   ScriptLine: 102   Description:The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available

Use this code

$SmtpServer = "smtp.gmail.com"          ; address for the smtp-server to use - REQUIRED

$FromName = "Customer support"                  ; name from who the email was sent

$FromAddress = "own@customer.com"; address from where the mail should come

$ToAddress = "digi.admin@gamil.com" ; destination address of the email - REQUIRED

$Subject = "Test Mail"               ; subject from the email - can be anything you want it to be

$Body = "this is just a test email"  ; the messagebody from the mail - can be left blank but then you get a blank mail

$AttachFiles = ""    ; the file you want to attach- leave blank if not needed
$CcAddress = ""  ; address for cc - leave blank if not needed
$BccAddress = ""; address for bcc - leave blank if not needed

$Importance = "Normal"              ; Send message priority: "High", "Normal", "Low"

$Username = "digi.admin@gamil.com"      ; username for the account used from where the mail gets sent - REQUIRED

$Password = "mypass"                ; password for the account used from where the mail gets sent - REQUIRED

;~ $IPPort = 25                       ; port used for sending the mail
;~ $ssl = 0                           ; enables/disables secure socket layer sending - put to 1 if using httpS

$IPPort=465                     ; GMAIL port used for sending the mail

$ssl=1                           ; GMAILenables/disables secure socket layer sending - put to 1 if using httpS
Edited by Digisoul

73 108 111 118 101 65 117 116 111 105 116

  • Developers
Posted (edited)

you are sure about this: $Username = "digi.admin@gamil.com" ????????????????

$Username = "digi.admin"         ; username for the account used from where the mail gets sent - REQUIRED
$Password = "mypass"        ; password for the account used from where the mail gets sent - REQUIRED
$IPPort=465             ; GMAIL port used for sending the mail
$ssl=1                      ; GMAILenables/disables secure socket layer sending - put to 1 if using httpS\
Edited by Jos

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.
  :)

Posted

you are sure about this: $Username = "digi.admin@gamil.com" ????????????????

Yes i use 1 more SMTP program (i dont know now where from i download it) compiled with AI , send the mail very well but you UDF not working.

73 108 111 118 101 65 117 116 111 105 116

  • Developers
Posted (edited)

Yes i use 1 more SMTP program (i dont know now where from i download it) compiled with AI , send the mail very well but you UDF not working.

My UDF is working fine with GMail when used correctly. Now did you check the bit I marked red because it contains a spelling error?

... and have you tried like I shown in the snippet?

Edited by Jos

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.
  :)

Posted

My UDF is working fine with GMail when used correctly. Now did you check the bit I marked red because it contains a spelling error?

... and have you tried like I shown in the snippet?

Ah..That was my mistake, Sorry for that :P

73 108 111 118 101 65 117 116 111 105 116

  • 3 weeks later...
Posted (edited)

i used the script for gmail its not working?

used <username@gmail.com> and <username> both failed??

<edit - forgot to post the output :-)

### COM Error ! Number: 80020009 ScriptLine: 92 Description:The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available

according to this post http://mail.google.com/support/bin/answer.py?answer=78799 i tried using 587 for smtp port and got this:

### COM Error ! Number: 80020009 ScriptLine: 92 Description:The transport failed to connect to the server.

</edit>

Edited by rajeshontheweb
  • Developers
Posted

i used the script for gmail its not working?

used <username@gmail.com> and <username> both failed??

<edit - forgot to post the output :-)

### COM Error ! Number: 80020009 ScriptLine: 92 Description:The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available

according to this post http://mail.google.com/support/bin/answer.py?answer=78799 i tried using 587 for smtp port and got this:

### COM Error ! Number: 80020009 ScriptLine: 92 Description:The transport failed to connect to the server.

</edit>

It works for me so that means you are doing something wrong somewhere. What you are doing wrong is something that cannot be determined from the information posted.

Jos

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.
  :)

Posted (edited)

$SmtpServer = "smtp.gmail.com"              ; address for the smtp-server to use - REQUIRED
$FromName = "MyName via Script"                      ; name from who the email was sent
$FromAddress = "myname@gmail.com" ; address from where the mail should come
$ToAddress = "rajeshwithsoftware@gmail.com"   ; destination address of the email - REQUIRED
$Subject = "Auto Sender Tool"                   ; subject from the email - can be anything you want it to be
$Body = "testing Autoit"                               ; the messagebody from the mail - can be left blank but then you get a blank mail
$AttachFiles = ""                       ; the file you want to attach- leave blank if not needed
$CcAddress = ""       ; address for cc - leave blank if not needed
$BccAddress = ""     ; address for bcc - leave blank if not needed
$Importance = "Normal"                  ; Send message priority: "High", "Normal", "Low"
$Username = "myname"                    ; username for the account used from where the mail gets sent - REQUIRED
$Password = "mypass"                  ; password for the account used from where the mail gets sent - REQUIRED
;~ $IPPort = 25                            ; port used for sending the mail
;~ $ssl = 1                                ; enables/disables secure socket layer sending - put to 1 if using httpS
$IPPort=465                          ; GMAIL port used for sending the mail
$ssl=1                               ; GMAILenables/disables secure socket layer sending - put to 1 if using httpS

this returns the exact error as posted in here earlier... pls check where i am wrong :-(

When i use CDO COM object for sending email it works perfectly alright with this email settings (of course, uname and pword are not true here)

Edited by rajeshontheweb
  • Developers
Posted

$SmtpServer = "smtp.gmail.com"              ; address for the smtp-server to use - REQUIRED
$FromName = "MyName via Script"                      ; name from who the email was sent
$FromAddress = "myname@gmail.com" ; address from where the mail should come
$ToAddress = "rajeshwithsoftware@gmail.com"   ; destination address of the email - REQUIRED
$Subject = "Auto Sender Tool"                   ; subject from the email - can be anything you want it to be
$Body = "testing Autoit"                               ; the messagebody from the mail - can be left blank but then you get a blank mail
$AttachFiles = ""                       ; the file you want to attach- leave blank if not needed
$CcAddress = ""       ; address for cc - leave blank if not needed
$BccAddress = ""     ; address for bcc - leave blank if not needed
$Importance = "Normal"                  ; Send message priority: "High", "Normal", "Low"
$Username = "myname"                    ; username for the account used from where the mail gets sent - REQUIRED
$Password = "mypass"                  ; password for the account used from where the mail gets sent - REQUIRED
;~ $IPPort = 25                            ; port used for sending the mail
;~ $ssl = 1                                ; enables/disables secure socket layer sending - put to 1 if using httpS
$IPPort=465                          ; GMAIL port used for sending the mail
$ssl=1                               ; GMAILenables/disables secure socket layer sending - put to 1 if using httpS

this returns the exact error as posted in here earlier... pls check where i am wrong :-(

When i use CDO COM object for sending email it works perfectly alright with this email settings (of course, uname and pword are not true here)

Give me a short script that shows the error (without showing your account info) and I can run to test.

Code portions like this do not tell me enough to know the issue.

Also specify the OS you run on and the AutoIt3 version.

Jos

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.
  :)

Posted (edited)

would like to suggest a small addition

If $Username <> _GetUserNameFromEmailID($FromAddress) Then 
MsgBox(4096, "Warning" , "Please Check Username & Email address seem to be conflicting " &  @CRLF & $Username " & " / " & _GetUserNameFromEmailID($FromAddress))
Endif 



Func _GetUserNameFromEmailID($EmailAddress)
    Local $UserName, $addressLen , $FindAT
    $addressLen = StringLen($EmailAddress)
    $FindAT = StringInStr( $EmailAddress, "\" ,0 , -1 )
    $UserName = StringRight($EmailAddress ,$addressLen - $FindAT)
    IF @ERROR Then Exit 
    Return $UserName 
EndFunc

that we know now we have a very easy error leading to some strange error message

Edited by rajeshontheweb
  • Developers
Posted (edited)

would like to suggest a small addition

If $Username <> _GetUserNameFromEmailID($FromAddress) Then 
MsgBox(4096, "Warning" , "Please Check Username & Email address seem to be conflicting " &  @CRLF & $Username " & " / " & _GetUserNameFromEmailID($FromAddress))
Endif 



Func _GetUserNameFromEmailID($EmailAddress)
    Local $UserName, $addressLen , $FindAT
    $addressLen = StringLen($EmailAddress)
    $FindAT = StringInStr( $EmailAddress, "\" ,0 , -1 )
    $UserName = StringRight($EmailAddress ,$addressLen - $FindAT)
    IF @ERROR Then Exit 
    Return $UserName 
EndFunc

that we know now we have a very easy error leading to some strange error message

This is only valid for Gmail, not needed for any other regular SMTP server as there is no Username used.

How about just filling in the fields correctly? :D

Edited by Jos

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.
  :)

Posted

Seeing the last 3 people I read had user errors, I'm gonna say, I got mine working and I love it. I'm making a program to view and control our databases. Before people had to print the page, write their suggestions, and hand it to me to make the changes. I'm making the new database so they can type in their suggestion, and it emails me telling me exactly where and what they want to change. Eventually I'll make it so all I have to do is hit accept changes, or even better, be able to email back and just say accept or deny and have the changes be made. Then I can do my work from my iPhone :D. Knowing Jos, he probably has a throbbing headache from this project so I figured I'd through him a Tylenol.

Giggity

  • Developers
Posted (edited)

..... Knowing Jos, he probably has a throbbing headache from this project so I figured I'd through him a Tylenol.

:D... couple of remarks:

- Doubt you really know.

- No way this will give me a headache because else I would have a daily one with all the stuff I deal with. Hardly have a headache anyways.

- Tylenol: Cannot remember having ever seen this in The Netherlands

:o

.. but glad you found good use for the little UDF. :D

Edited by Jos

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.
  :)

Posted

No I don't really "know" you, just from what I have seen on here. I have great admiration for you all and would not be able to deal with what you Developers deal with. Forgive me if I'm wrong but it seemed you were on the verge of reaching through your computer screen and choking someone for making mistakes and assuming it was your fault. If you were Valik you probably would have by now :D

I had also assumed Tylenol was more global than I guess it actually is. Advil Perhaps? Aspirin even?

Giggity

  • 2 weeks later...
Posted

I use this script on alot of servers,

and was having trouble on Exchange 2007 servers.

For some reason it looks like the dll this uses might not be registered on these.

I have been using this to get round it:

#RequireAdmin;Elevate to Admin so we can register the dll
If FileExists(@SystemDir & "\cdosys.dll") Then Run("regsvr32 " & @SystemDir & "\cdosys.dll -s", @SystemDir)

Should help anyone else having the problems i have been.

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
  • Recently Browsing   0 members

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