Jump to content
Sign in to follow this  
Ghost21

Sending Email

Recommended Posts

Ghost21

I'm trying to use our standard email code. To send a email with an Exchange server instead, and I can't seem to get it to go... Any help would be greaat!!!

#include <INet.au3>

$s_SmtpServer = "mysmtpserver.com.au"

$s_FromName = "My Name"

$s_FromAddress = "From eMail Address"

$s_ToAddress = "To eMail Address"

$s_Subject = "My Test UDF"

Dim $as_Body[2]

$as_Body[0] = "Testing the new email udf"

$as_Body[1] = "Second Line"

$Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)

$err = @error

If $Response = 1 Then

MsgBox(0, "Success!", "Mail sent")

Else

MsgBox(0, "Error!", "Mail failed with error code " & $err)

EndIf

Share this post


Link to post
Share on other sites
SadBunny

I'm trying to use our standard email code. To send a email with an Exchange server instead, and I can't seem to get it to go... Any help would be greaat!!!

#include <INet.au3>

$s_SmtpServer = "mysmtpserver.com.au"

$s_FromName = "My Name"

$s_FromAddress = "From eMail Address"

$s_ToAddress = "To eMail Address"

$s_Subject = "My Test UDF"

Dim $as_Body[2]

$as_Body[0] = "Testing the new email udf"

$as_Body[1] = "Second Line"

$Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)

$err = @error

If $Response = 1 Then

MsgBox(0, "Success!", "Mail sent")

Else

MsgBox(0, "Error!", "Mail failed with error code " & $err)

EndIf

Is your exchange server enabled to accept pop3/smtp connections? As far as I remember, by default it is not enabled and you can only connect to it through the exchange protocols and not automatically through pop3/smtp.

I don't know where to enable this but a colleague of mine set it up recently so I know it can be done :-)

I did one search in google and maybe this helps: http://www.intermedia.net/support/kb/default.asp?id=824


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites
Ghost21

Is your exchange server enabled to accept pop3/smtp connections? As far as I remember, by default it is not enabled and you can only connect to it through the exchange protocols and not automatically through pop3/smtp.

I don't know where to enable this but a colleague of mine set it up recently so I know it can be done :-)

I did one search in google and maybe this helps: http://www.intermedia.net/support/kb/default.asp?id=824

Yeah that's where it gets harder . The Pop3 is disabled on the server for our own reasons.. Any way to get around that ?? so it just uses exchange ???

Share this post


Link to post
Share on other sites
SadBunny

Yeah that's where it gets harder . The Pop3 is disabled on the server for our own reasons.. Any way to get around that ?? so it just uses exchange ???

You'll have to write something that speaks Exchange. Maybe someone already did (and made UDFs) and/or found another way to speak Exchange (dll's, API?), I don't know, I hardly ever have any need for exchange functionality. Search the forum, there are a lot of threads about exchange stuff. If you don't find anything, maybe you should post a new topic asking more specifically about how to speak Exchange.

Good luck!


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites
boomingranny

i don't see a need for pop3 if you are only sending email, smtp is for sending, pop3 is for recieving...

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  

×