#205869 - 2012-10-01 12:25 PM
UDF Sendmail Query
|
GeorgeLittle
Fresh Scripter
Registered: 2011-02-08
Posts: 47
Loc: UK
|
Hi,
Here is my call of the UDF Sendmail
sendmail('george.little@test.lobi.com,'test@test.lobi.com','Testing 1-2-3','Goats',"Text",'smtpmail.lobi.com,1)
So I have two questions the call completes without showing any errors is this Syntax correct to send to a open SMTP server ?
Can I add a value held in a variable to the email eg $cat into the subject ?
|
|
Top
|
|
|
|
#205872 - 2012-10-01 01:56 PM
Re: UDF Sendmail Query
[Re: Mart]
|
GeorgeLittle
Fresh Scripter
Registered: 2011-02-08
Posts: 47
Loc: UK
|
Yes I included the UDF and it has the no strings in the UDF
|
|
Top
|
|
|
|
#205874 - 2012-10-01 02:24 PM
Re: UDF Sendmail Query
[Re: GeorgeLittle]
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4562
Loc: USA
|
There is more than one sendmail UDF here... is this one the one you are using?
Sendmail - http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=201907#Post201907
If so,
You don't have to double up on @ or turn or nomacros, it takes care of it. (Although turning on NoMacrosinstrings is a good practice)
You can use a variable in any of the parameters of the function, ie sendmail($to_name,$from_name,"Date: " + @date)
For this particular sendmail function your syntax would be:
$RC=sendmail('george.little@test.lobi.com,'test@test.lobi.com','Testing 1-2-3','Goats',"Text",,'smtpmail.lobi.com')
? @serror
You were putting the smtp server where the attachment goes. So adding a comma will allow you to omit the attachment and put the server in the correct location.
|
|
Top
|
|
|
|
#205875 - 2012-10-01 02:32 PM
Re: UDF Sendmail Query
[Re: Allen]
|
Les
KiX Master
   
Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
|
There is more than one sendmail UDF here... is this one the one you are using? Sendmail - http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=201907#Post201907If so, You don't have to double up on @ or turn or nomacros, it takes care of it. (Although turning on NoMacrosinstrings is a good practice) You can use a variable in any of the parameters of the function, ie sendmail($to_name,$from_name,"Date: " + @date) For this particular sendmail function your syntax would be: $RC=sendmail( 'george.little@test.lobi.com,'test@test.lobi.com','Testing 1-2-3','Goats',"Text",,'smtpmail.lobi.com') You were putting the smtp server where the attachment goes. So adding a comma will allow you to omit the attachment and put the server in the correct location. The quoting is still odd.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.
|
|
Top
|
|
|
|
#205876 - 2012-10-01 02:39 PM
Re: UDF Sendmail Query
[Re: Les]
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4562
Loc: USA
|
Thanks Les, I didn't even look at that.
$RC=sendmail('george.little@test.lobi.com','test@test.lobi.com','Testing 1-2-3','Goats','Text',,'smtpmail.lobi.com')
? @serror
|
|
Top
|
|
|
|
#205880 - 2012-10-01 03:57 PM
Re: UDF Sendmail Query
[Re: Glenn Barnas]
|
GeorgeLittle
Fresh Scripter
Registered: 2011-02-08
Posts: 47
Loc: UK
|
Thanks guys well I now get a CDO error message so thats some progress. -he server.ion error "send" (CDO.Message.1 - The transport failed to connect to t ) [-2147352567/80020009]
So have I got the authentication set to none ? or have I not got enougth commas. Sorry to ask some many newb instructions I used to use Blat
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 793 anonymous users online.
|
|
|