Jump to content

Recommended Posts

Posted

I am having trouble with automatically sending the mail aftre it's created. I've looked already in the help file and the forum, but can't find an answer.

This is what I have so far:

#include <INet.au3>

Dim $DAG

$DAG = @WDAY

IF $DAG = 1 Then

$Var1 = "Zondag " & @MDAY & "-" & @MON & "-" & @YEAR

Else

IF $DAG = 2 Then

$Var1 = ,"Maandag " & @MDAY & "-" & @MON & "-" & @YEAR

Else

IF $DAG = 3 Then

$Var1 = "Dinsdag " & @MDAY & "-" & @MON & "-" & @YEAR

Else

IF $DAG = 4 Then

$Var1 = "Woensdag " & @MDAY & "-" & @MON & "-" & @YEAR

Else

IF $DAG = 5 Then

$Var1 = "Donderdag " & @MDAY & "-" & @MON & "-" & @YEAR

Else

IF $DAG = 6 Then

$Var1 = "Vrijdag " & @MDAY & "-" & @MON & "-" & @YEAR

Else

IF $DAG = 7 Then

$Var1 = "Zaterdag " & @MDAY & "-" & @MON & "-" & @YEAR

Endif

Endif

Endif

Endif

Endif

Endif

Endif

$Address = "somthing@something.com"

$Subject = $Var1

$Body = "This mail is automatically generated"

MsgBox(0,'E-Mail has been opened', "Creating Mail message " & _INetMail($address, $subject, $body),3)

Posted

Try this, you had a comma where it didn't belong in the second $Var1 = statement

#include <INet.au3>

Dim $DAG = @WDAY
Select 
    Case $DAG = 1
        $Var1 = "Zondag " & @MDAY & "-" & @MON & "-" & @YEAR
    Case $DAG = 2
        $Var1 = "Maandag " & @MDAY & "-" & @MON & "-" & @YEAR
    Case $DAG = 3
        $Var1 = "Dinsdag " & @MDAY & "-" & @MON & "-" & @YEAR
    Case $DAG = 4
        $Var1 = "Woensdag " & @MDAY & "-" & @MON & "-" & @YEAR
    Case $DAG = 5
        $Var1 = "Donderdag " & @MDAY & "-" & @MON & "-" & @YEAR
    Case $DAG = 6
        $Var1 = "Vrijdag " & @MDAY & "-" & @MON & "-" & @YEAR
    Case $DAG = 7
        $Var1 = "Zaterdag " & @MDAY & "-" & @MON & "-" & @YEAR
EndSelect

$Address = "somthing@something.com"
$Subject = $Var1
$Body = "This mail is automatically generated"
MsgBox(0,'E-Mail has been opened', "Creating Mail message " & _INetMail($address, $subject, $body),3)

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted

Isn't there anybody who can help me? :think:

I tried using send() command, but that doesn't work. It is if he can't detect the window from the mail.

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
×
×
  • Create New...