Jump to content
Sign in to follow this  
Lempke

_inetmail

Recommended Posts

Lempke

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)

Share this post


Link to post
Share on other sites
GaryFrost

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.

 

Share this post


Link to post
Share on other sites
Lempke

Thx, didn't see that.

But HOW can I send the mail after it's created?

Share this post


Link to post
Share on other sites
Lempke

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.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.